Think about Loose Coupling | |
PerlMonks |
Re: disable functions if module not installedby almut (Canon) |
on Nov 03, 2008 at 22:25 UTC ( [id://721229]=note: print w/replies, xml ) | Need Help?? |
Something like this works for me:
(my $is_magick; is fine, too, btw) Note that the assignment in our $is_magick = 1; in your snippet would be executed after the BEGIN block... Also, the BEGIN block is only necessary if you need $is_magick's state to be valid early on.
In Section
Seekers of Perl Wisdom
|
|