- or download this
package Foo;
+
+
sub new {
...
my ($self, @args) = @_;
return map { ++$_ } @args;
}
- or download this
# in package Foo
sub wonk {
my $self = shift;
_fiddle($self, @_);
}
- or download this
+
package Bar;
use Foo;
...
my $self = shift;
$self->{_foo}->wonk(@_); # delegation!
}