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.
In Section
Seekers of Perl Wisdom