- or download this
package foo;
sub new{
...
my $base = $self->{base_class};
print eval "\$self->$base\::read";
}
- or download this
no strict 'refs';
print $self->&{"$base\::read"}; # syntax error
...
# executes but ignores $base's inheritance, if any
no strict 'refs';
print &{"$base\::read"}( $self );
- or download this
# code above package foo unchanged
...
}
# all other code unchanged