in reply to routines as separate files?
You might want to check out perldoc perltoot. This will nudge you in the right direction.
An example, first the package:
and now a main program calling it:package MyPackage; use Exporter; use vars qw / @EXPORTS @ISA /; my @EXPORTS=qw / mysub /; my @ISA = qw/ Exporter /; sub mysub { print "mysub is going to return \"mysub\"\n"; return "mysub"; } 1;
#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use MyPackage; print mysub(),"\n";
Like I said... perldoc perltoot is your friend.
Peter @ Berghold . Net
Sieze the cow! Bite the day!
Nobody expects the Perl inquisition!
Test the code? We don't need to test no stinkin' code!
All code posted here is as is where is unless otherwise stated.
Brewer of Belgian style Ales
|
|---|