X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FAttribute.pm;h=fc8d58b7cfaa70e2a993769d377b16d4077e44c0;hb=6b5ac420e48ce3b29d9fe53094954821508b2925;hp=7d9856c85eefb2990d726f520d740cd690563bcd;hpb=0bfc85b88523ddd75e0868d6ec1244f4365bda07;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 7d9856c..fc8d58b 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -9,7 +9,8 @@ use Class::MOP::Method::Accessor; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken'; -our $VERSION = '0.65'; +our $VERSION = '0.71_02'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Object'; @@ -51,7 +52,7 @@ sub new { confess("A required attribute must have either 'init_arg', 'builder', or 'default'"); } - $class->_new(%options); + $class->_new(\%options); } sub _new { @@ -240,7 +241,7 @@ sub get_write_method_ref { } sub is_default_a_coderef { - ('CODE' eq ref($_[0]->{'default'} || $_[0]->{default})) + ('CODE' eq ref($_[0]->{'default'})) } sub default {