Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think you will find there is an issue here with use and BEGIN. use is equivalent to BEGIN { require Module; import Module LIST; } and a BEGIN block is run as soon as possible. This effectively means when the closing brace is encountered. In your above code the implied BEGIN block in use will be run before the surrounding BEGIN block and its if logic is evaluated. Not What you want. I read a node recently that explained it all far better than I can, I will link it here as soon as I can find it Here tachyon gives an ellegant eaxample of the futility of wrapping use in an if </code>Cheers, In reply to Re: conditional enable use bytes for a whole module at compiletime?
by Random_Walk
|
|