# Test module foo package Bar; use Foo; #use Foo qw(FooFunc FooSub); BEGIN { require Exporter; # set the version for version checking our $VERSION = 1.00; # Inherit from Exporter to export functions and variables our @ISA = qw(Exporter); # Functions and variables which are exported by default our @EXPORT = qw(BarFunc BarSub); # Functions and variables which can be optionally exported our @EXPORT_OK = qw(); } sub BarFunc { return "I, BarFunc, solemnly declare: ".FooFunc()."\n"; } sub BarSub { print "Howdy, Stranger !\n"; print "I'm BarSub, and I'm going to tell you a secret: '".FooSub()."'\n"; } 1;