package Test::Parser; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); sub test1 { print "New message for test1\n"; } sub test2 { print "New message for test2\n"; } my %lists = ( 'test1' => \&test1, 'test2' => \&test2 ); @ISA = qw(Exporter); $VERSION = 0.1; @EXPORT = qw(%lists); # What's allowed to be exported @EXPORT_OK = qw(%lists); 1; #### #!/usr/bin/perl -w # # tmp.pl # use strict; use Test::Parser; for my $key (keys %lists) { $lists{$key}->(); }