Help for this page

Select Code to Download


  1. or download this
    use MyModule { foo' => 'bar' }, qw/do_something do_something_else/;
    
  2. 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
    }
    
  3. or download this
    package MyModule;
    
    ...
       my ($class, $config) = @_;
       # do stuff with $config here
    }