Class::MOP::_is_valid_class_name($package_name)
|| confess "creation of $package_name failed: invalid package name";
- $self->add_package_symbol('$VERSION', \$version);
- $self->add_package_symbol('$AUTHORITY', \$authority);
+ ${ $self->get_package_symbol('$VERSION', create => 1) } = $version;
+ ${ $self->get_package_symbol('$AUTHORITY', create => 1) } = $authority;
return;
}
$body = $method;
}
-
- my ( $current_package, $current_name ) = Class::MOP::get_code_info($body);
-
- if ( !defined $current_name || $current_name eq '__ANON__' ) {
- my $full_method_name = ($self->name . '::' . $method_name);
- subname($full_method_name => $body);
- }
-
$self->add_package_symbol(
{ sigil => '&', type => 'CODE', name => $method_name },
$body,