#!/usr/bin/perl -w use strict; package TEST_GIZMO; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); use Exporter; our $VERSION=1.00; our @ISA = qw(Exporter); our @EXPORT = qw(test1 test2); our @EXPORT_OK = qw(); #some avanced stuff but it is possible #to only export a subset of functions by #default and allow others to be imported #"by request". sub test1 { print "test1 in TEST GIZMO worked!\n"; } sub test2 { print "test2 in TEST GIZMO worked!\n"; } 1; ### this is obscure stuff, but you need this line !!!! ### by default Perl returns the value of the last line in a ### sub or package. In this case, it means that this package ### inclusion "worked". In the C world or command line, ### shell world, 0, zero means "it worked", non-zero is ### an error code, but not in THIS case of Perl. "1" is the ### right return value here! Any way trust me, you need a ### 1 return value at the end of a .pm module. #### #!/usr/bin/perl -w use strict; use TEST_GIZMO; test1; test2; TEST_GIZMO::test1; #this is "fully qualified name", a way to #invoke test1 even if that name wasn't #explicitly exported.