in reply to Conditionally faking a module
If you want to run some code if a module isn't installed, just test the use statement for failure:
eval "use Cava::Pack" or do { # your code goes here };
Super Search will find several threads on this topic, including Auto install of a perl package if 'use' statement fails.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Conditionally faking a module
by wanna_code_perl (Friar) on Jan 13, 2010 at 19:01 UTC | |
by bobf (Monsignor) on Jan 13, 2010 at 19:14 UTC | |
by Anonymous Monk on Jan 13, 2010 at 21:27 UTC | |
by ikegami (Patriarch) on Jan 15, 2010 at 18:01 UTC |
In Section
Seekers of Perl Wisdom