|
|
| more useful options | |
| PerlMonks |
Running modulino inside BEGINby LanX (Saint) |
| on Apr 14, 2024 at 17:22 UTC ( [id://11158864]=perlquestion: print w/replies, xml ) | Need Help?? |
|
LanX has asked for the wisdom of the Perl Monks concerning the following question:
Hi while developing a module I like to run (F5) the testsuite automatically. I'm using a moulino approach which works considerably well
It occurred to me that I have to enclose this inside a BEGIN block to avoid the overhead and side-effects of loding all modules with use (this happens in the BEGIN phase) before the unless is executed at run time. This doesn't work, since caller() IS defined inside BEGIN
EDIT Solutionwhile writing this I realized that BEGIN is called 2 levels down, hence caller(2) seems to work
Is this reliable? (I think it is, but I already wrote this post, before finding the solution and the monastery is not overwhelmed with writeups :)
Cheers Rolf
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||