sub get_method_map {
my $self = shift;
- if (defined $self->{'$!_package_cache_flag'} &&
- $self->{'$!_package_cache_flag'} == Class::MOP::check_package_cache_flag($self->meta->name)) {
- return $self->{'%!methods'};
+ if (defined $self->{'_package_cache_flag'} &&
+ $self->{'_package_cache_flag'} == Class::MOP::check_package_cache_flag($self->meta->name)) {
+ return $self->{'methods'};
}
- my $map = $self->{'%!methods'};
+ my $map = $self->{'methods'};
my $class_name = $self->name;
my $method_metaclass = $self->method_metaclass;
my $self = bless {
# from our superclass
- '&!body' => undef,
- '$!package_name' => $options{package_name},
- '$!name' => $options{name},
+ 'body' => undef,
+ 'package_name' => $options{package_name},
+ 'name' => $options{name},
# specific to this subclass
- '%!options' => $options{options},
- '$!meta_instance' => $options{metaclass}->get_meta_instance,
- '@!attributes' => [ $options{metaclass}->compute_all_applicable_attributes ],
+ 'options' => $options{options},
+ 'meta_instance' => $options{metaclass}->get_meta_instance,
+ 'attributes' => [ $options{metaclass}->compute_all_applicable_attributes ],
# ...
- '$!associated_metaclass' => $options{metaclass},
+ 'associated_metaclass' => $options{metaclass},
} => $class;
# we don't want this creating
# a cycle in the code, if not
# needed
- weaken($self->{'$!associated_metaclass'});
+ weaken($self->{'associated_metaclass'});
$self->initialize_body;
## accessors
-sub options { (shift)->{'%!options'} }
-sub meta_instance { (shift)->{'$!meta_instance'} }
-sub attributes { (shift)->{'@!attributes'} }
+sub options { (shift)->{'options'} }
+sub meta_instance { (shift)->{'meta_instance'} }
+sub attributes { (shift)->{'attributes'} }
-sub associated_metaclass { (shift)->{'$!associated_metaclass'} }
+sub associated_metaclass { (shift)->{'associated_metaclass'} }
## method
$code = eval $source;
confess "Could not eval the constructor :\n\n$source\n\nbecause :\n\n$@" if $@;
}
- $self->{'&!body'} = $code;
+ $self->{'body'} = $code;
}
sub _generate_BUILDARGS {
my $self = bless {
# from our superclass
- '&!body' => undef,
- '$!package_name' => $options{package_name},
- '$!name' => $options{name},
+ 'body' => undef,
+ 'package_name' => $options{package_name},
+ 'name' => $options{name},
# ...
- '%!options' => $options{options},
- '$!associated_metaclass' => $options{metaclass},
+ 'options' => $options{options},
+ 'associated_metaclass' => $options{metaclass},
} => $class;
# we don't want this creating
# a cycle in the code, if not
# needed
- weaken($self->{'$!associated_metaclass'});
+ weaken($self->{'associated_metaclass'});
$self->initialize_body;
## accessors
-sub options { (shift)->{'%!options'} }
-sub associated_metaclass { (shift)->{'$!associated_metaclass'} }
+sub options { (shift)->{'options'} }
+sub associated_metaclass { (shift)->{'associated_metaclass'} }
## method
|| confess "When calling is_needed as a class method you must pass a class name";
return $_[0]->meta->can('DEMOLISH');
}
- defined $self->{'&!body'} ? 1 : 0
+ defined $self->{'body'} ? 1 : 0
}
sub initialize_body {
$code = eval $source;
confess "Could not eval the destructor :\n\n$source\n\nbecause :\n\n$@" if $@;
}
- $self->{'&!body'} = $code;
+ $self->{'body'} = $code;
}