laziness, impatience, and hubris | |
PerlMonks |
Re: Modules as executable scripts?by Zaxo (Archbishop) |
on Jun 15, 2007 at 02:01 UTC ( [id://621381]=note: print w/replies, xml ) | Need Help?? |
You can test whether Runnable.pm was called from the command line by comparing $0 to __FILE__. I'm not convinced this is a good idea. I'd prefer to keep my modules distinct from my scripts and to only act like modules. That might save confusion on both the maintainer's and users' parts. After Compline,
In Section
Seekers of Perl Wisdom
|
|