From: Chris Prather Date: Thu, 30 Apr 2009 04:30:45 +0000 (-0400) Subject: 05:27 <@autarch> just import them in both Moose & CMOP X-Git-Tag: 0.84~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbdaea42d9c753913a13892ab705e622efd045bf;p=gitmo%2FClass-MOP.git 05:27 <@autarch> just import them in both Moose & CMOP --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index c6ed0e3..82ca2b2 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -12,8 +12,8 @@ use Class::MOP::Class::Immutable::Class::MOP::Class; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken'; -use Sub::Name (); -use Devel::GlobalDestruction (); +use Sub::Name 'subname'; +use Devel::GlobalDestruction 'in_global_destruction'; our $VERSION = '0.83'; $VERSION = eval $VERSION; @@ -248,7 +248,7 @@ sub _check_metaclass_compatibility { sub DESTROY { my $self = shift; - return if Devel::GlobalDestruction::in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated + return if in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated no warnings 'uninitialized'; return unless $self->name =~ /^$ANON_CLASS_PREFIX/; @@ -612,7 +612,7 @@ sub add_method { my $full_method_name = ($self->name . '::' . $method_name); $self->add_package_symbol( { sigil => '&', type => 'CODE', name => $method_name }, - Sub::Name::subname($full_method_name => $body) + subname($full_method_name => $body) ); } @@ -649,7 +649,7 @@ sub add_method { || confess "You must pass in a method name"; my $method = $fetch_and_prepare_method->($self, $method_name); $method->add_before_modifier( - Sub::Name::subname(':before' => $method_modifier) + subname(':before' => $method_modifier) ); } @@ -659,7 +659,7 @@ sub add_method { || confess "You must pass in a method name"; my $method = $fetch_and_prepare_method->($self, $method_name); $method->add_after_modifier( - Sub::Name::subname(':after' => $method_modifier) + subname(':after' => $method_modifier) ); } @@ -669,7 +669,7 @@ sub add_method { || confess "You must pass in a method name"; my $method = $fetch_and_prepare_method->($self, $method_name); $method->add_around_modifier( - Sub::Name::subname(':around' => $method_modifier) + subname(':around' => $method_modifier) ); }