We don't bite newbies here... much | |
PerlMonks |
Re^3: Modules as executable scripts?by aufflick (Deacon) |
on Jun 19, 2007 at 12:33 UTC ( [id://622005]=note: print w/replies, xml ) | Need Help?? |
good point - completely correct. taking a look at the -M syntax in perlrun, a cute thing you could do is to implement (or override) import() in your package, and respond to triggers passed in:
the following commandline: perl -MDoIt=run,arg1,arg2 will call the DoIt::run sub with @_ set to qw(run arg1 arg2).
In Section
Seekers of Perl Wisdom
|
|