- or download this
package foo;
BEGIN { print "foo's BEGIN\n"; }
...
print "foo's import: @_\n";
}
1;
- or download this
package bar;
use foo qw(from bar);
1;
- or download this
use lib '.';
use foo qw(from test.pl);
use foo qw(from test.pl again);
use bar;
- or download this
$ perl test.pl
foo's BEGIN
...
foo's import: from test.pl again
foo's import: from bar
$