X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP.pm;h=9f6f5836fcadd5b5ec6a5c3c02ccd83cae1bf089;hb=403cfbeccca4e7750da88c52ad7fd81f35a7e9a7;hp=7c94f539a19814e464d88a1a02d11aa977ce1a2d;hpb=a3dbd18f480ddc0eb70dc292792d36ce541af2b2;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 7c94f53..9f6f583 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -20,12 +20,12 @@ use Class::MOP::Method; use Class::MOP::Immutable; BEGIN { - *IS_RUNNING_ON_5_10 = ($] < 5.009_005) + *IS_RUNNING_ON_5_10 = ($] < 5.009_005) ? sub () { 0 } - : sub () { 1 }; + : sub () { 1 }; sub HAVE_ISAREV () { - warn "Class::MOP::HAVE_ISAREV is deprecated and will be removed in a future release. It has always returned 1 anyway."; + Carp::cluck("Class::MOP::HAVE_ISAREV is deprecated and will be removed in a future release. It has always returned 1 anyway."); return 1; } @@ -33,10 +33,10 @@ BEGIN { *check_package_cache_flag = \&mro::get_pkg_gen; } -our $VERSION = '0.79'; +our $VERSION = '0.82'; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; -our $AUTHORITY = 'cpan:STEVAN'; +our $AUTHORITY = 'cpan:STEVAN'; require XSLoader; XSLoader::load( __PACKAGE__, $XS_VERSION ); @@ -62,6 +62,7 @@ XSLoader::load( __PACKAGE__, $XS_VERSION ); # This handles instances as well as class names sub class_of { + return unless defined $_[0]; my $class = blessed($_[0]) || $_[0]; return $METAS{$class}; } @@ -178,7 +179,7 @@ sub _is_valid_class_name { # We need to add in the meta-attributes here so that # any subclass of Class::MOP::* will be able to -# inherit them using &construct_instance +# inherit them using _construct_instance ## -------------------------------------------------------- ## Class::MOP::Package @@ -364,7 +365,7 @@ Class::MOP::Class->meta->add_attribute( # we don't actually need to tie the knot with # Class::MOP::Class here, it is actually handled # within Class::MOP::Class itself in the -# construct_class_instance method. +# _construct_class_instance method. ## -------------------------------------------------------- ## Class::MOP::Attribute