- or download this
use MyModule { foo' => 'bar' }, qw/do_something do_something_else/;
- or download this
sub import {
my $class = shift;
...
unshift @_, $class; # restore $class onto @_ for Exporter
goto \&Exporter::import; # need to use "goto" to ensure tail call
}
- or download this
package MyModule;
...
my ($class, $config) = @_;
# do stuff with $config here
}