Under -d, the subname of an anon coderef is '__ANON__[Some/File.pm:42]' instead
of just '__ANON__'.
- Make is_class_loaded without any arguments fail loudly
(Florian Ragwitz).
+ * Class::MOP::Package
+ - Stop add_method from behaving differently under the debugger
+ (Florian Ragwitz).
+
* Class::MOP::Class
* Class::MOP::Package
- Any method which takes a method name as an argument now allows names
if ($method->package_name ne $self->name) {
$method = $method->clone(
package_name => $self->name,
- name => $method_name
+ name => $method_name,
) if $method->can('clone');
}
my ( $current_package, $current_name ) = Class::MOP::get_code_info($body);
- if ( !defined $current_name || $current_name eq '__ANON__' ) {
+ if ( !defined $current_name || $current_name =~ /^__ANON__/ ) {
my $full_method_name = ($self->name . '::' . $method_name);
subname($full_method_name => $body);
}