Lots of code cleanup in M::AH traits.
[gitmo/Moose.git] / lib / Moose / AttributeHelpers / Trait / Bool.pm
index 5da9db2..c4e4223 100644 (file)
@@ -10,6 +10,8 @@ with 'Moose::AttributeHelpers::Trait::Base';
 
 sub helper_type { 'Bool' }
 
+sub _default_is { 'rw' }
+
 # NOTE:
 # we don't use the method provider for this
 # module since many of the names of the provied
@@ -23,15 +25,6 @@ has 'method_provider' => (
     default   => 'Moose::AttributeHelpers::MethodProvider::Bool'
 );
 
-before 'process_options_for_handles' => sub {
-    my ( $self, $options, $name ) = @_;
-
-    # Set some default attribute options here unless already defined
-    if ( ( my $type = $self->helper_type ) && !exists $options->{isa} ) {
-        $options->{isa} = $type;
-    }
-};
-
 no Moose::Role;
 
 # register the alias ...
@@ -57,7 +50,7 @@ Moose::AttributeHelpers::Bool
       metaclass => 'Bool',
       is        => 'rw',
       isa       => 'Bool',
-      default   => sub { 0 },
+      default   => 0,
       handles   => {
           illuminate  => 'set',
           darken      => 'unset',