Typo fix
[gitmo/Moose.git] / lib / Moose / Meta / Attribute.pm
index 9b93b15..54ba639 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use Scalar::Util 'blessed', 'weaken';
 use overload     ();
 
-our $VERSION   = '0.76';
+our $VERSION   = '0.79';
 our $AUTHORITY = 'cpan:STEVAN';
 
 use Moose::Meta::Method::Accessor;
@@ -348,7 +348,6 @@ sub _process_options {
         $class->throw_error("You can not use lazy_build and default for the same attribute ($name)", data => $options)
             if exists $options->{default};
         $options->{lazy}      = 1;
-        $options->{required}  = 1;
         $options->{builder} ||= "_build_${name}";
         if ($name =~ /^_/) {
             $options->{clearer}   ||= "_clear${name}";
@@ -620,7 +619,8 @@ sub _canonicalize_handles {
         }
     }
     else {
-        my $role_meta = Class::MOP::load_class($handles);
+        Class::MOP::load_class($handles);
+        my $role_meta = Class::MOP::class_of($handles);
 
         (blessed $role_meta && $role_meta->isa('Moose::Meta::Role'))
             || $self->throw_error("Unable to canonicalize the 'handles' option with $handles because its metaclass is not a Moose::Meta::Role", data => $handles);