in reply to Re: Re: Using a subroutine as a module
in thread Using a subroutine as a module
Egads, far too many uses of OO are superfluous and/or ill advised already and now you want OO for simple library calls. Just use fully qualified package names:
#### MyMod.pm package MyMod; sub foo { "whatever" } 1; ### calling script #!/usr/bin/perl -w use strict; use MyMod; print MyMod::foo();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Using a subroutine as a module
by bobn (Chaplain) on Nov 03, 2003 at 15:43 UTC |
In Section
Seekers of Perl Wisdom