- or download this
{ package Base;
sub x { ... }
...
our @ISA = 'Base';
sub y { shift->x }
}
- or download this
package Package;
sub y { shift->x }
- or download this
{ package SomeRole;
# Implementor must provide y
...
our @ISA = 'SomeRole';
sub x { ... }
}
- or download this
sub some_method {
my ($self, $arg) = @_
...
$arg->other_method();
...
}
- or download this
sub some_method {
my ($self) = @_
...
$self->attribute->other_method();
...
}