sub superclasses {
my $self = shift;
- my $isa = $self->get_or_add_package_symbol(
- { sigil => '@', type => 'ARRAY', name => 'ISA' } );
+ my $isa = $self->get_or_add_package_symbol('@ISA');
if (@_) {
my @supers = @_;
subname( $full_method_name => $body );
}
- $self->add_package_symbol(
- { sigil => '&', type => 'CODE', name => $method_name },
- $body,
- );
+ $self->add_package_symbol("&$method_name", $body);
}
sub _code_is_mine {
my $map_entry = $self->_method_map->{$method_name};
return $map_entry if defined $map_entry;
- my $code = $self->get_package_symbol(
- {
- name => $method_name,
- sigil => '&',
- type => 'CODE',
- }
- );
+ my $code = $self->get_package_symbol("&$method_name");
unless ($map_entry) {
return unless $code && $self->_code_is_mine($code);
my $removed_method = delete $self->_method_map->{$method_name};
- $self->remove_package_symbol(
- { sigil => '&', type => 'CODE', name => $method_name } );
+ $self->remove_package_symbol("&$method_name");
$removed_method->detach_from_class
if $removed_method && blessed $removed_method;
sub version {
my $self = shift;
- ${$self->get_or_add_package_symbol({ sigil => '$', type => 'SCALAR', name => 'VERSION' })};
+ ${$self->get_or_add_package_symbol('$VERSION')};
}
sub authority {
my $self = shift;
- ${$self->get_or_add_package_symbol({ sigil => '$', type => 'SCALAR', name => 'AUTHORITY' })};
+ ${$self->get_or_add_package_symbol('$AUTHORITY')};
}
sub identifier {