On Jun 9, 2011, at 2:46 PM, John SJ Anderson wrote:

>  my $module_is_enabled = 0;
>  eval 'use My::Special::Module';
>  $module_is_enabled = 1 unless $@;
> 
> should do what you're looking for.

John,

        Thanks for the code.  Between that and wrapping a call to an external 
sub in an if statement, it works well.


On Jun 9, 2011, at 3:07 PM, Robert Wohlfarth wrote:

> Would something like this meet your need?
> 
> http://search.cpan.org/~ivorw/Module-Optional-0.03/lib/Module/Optional.pm

Robert,

        That looks really interesting and may be exactly what I need.  Thanks 
for sending the link.

Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to