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,
Zaxo
In reply to Re: Modules as executable scripts?
by Zaxo
in thread Modules as executable scripts?
by graff
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |