Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: conditional self-executionby kyle (Abbot) |
on Jan 28, 2008 at 03:11 UTC ( [id://664612]=note: print w/replies, xml ) | Need Help?? |
What you're describing sounds to me like a modulino. Update: In a nutshell, the way it's done is something like this:
It's using caller to tell whether it's being executed "at the top level". If you search for modulino on CPAN, there are a few examples to look at.
In Section
Seekers of Perl Wisdom
|
|