From: Jesse Luehrs Date: Mon, 18 Apr 2011 02:07:05 +0000 (-0500) Subject: no reason to not be using ::Package api here X-Git-Tag: 2.0100~219 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38f8dd86a6c25d76f900871498e78672abfe122d;p=gitmo%2FMoose.git no reason to not be using ::Package api here --- diff --git a/lib/Class/MOP/Module.pm b/lib/Class/MOP/Module.pm index 0dd274d..ea1433d 100644 --- a/lib/Class/MOP/Module.pm +++ b/lib/Class/MOP/Module.pm @@ -77,10 +77,10 @@ sub _instantiate_module { Class::MOP::_is_valid_class_name($package_name) || confess "creation of $package_name failed: invalid package name"; - no strict 'refs'; - scalar %{ $package_name . '::' }; # touch the stash - ${ $package_name . '::VERSION' } = $version if defined $version; - ${ $package_name . '::AUTHORITY' } = $authority if defined $authority; + $self->add_package_symbol('$VERSION' => $version) + if defined $version; + $self->add_package_symbol('$AUTHORITY' => $authority) + if defined $authority; return; }