On Thu, Jun 9, 2011 at 17:42, <[email protected]> wrote: > Using either require, use, or do produces an error if I run the script > without the module. Is there a specific function for this purpose, or would > I have to do something like wrap a 'use' or 'require' in an if statement? > I've tried that and it doesn't work so maybe I'm way off base on that one.
Something like: my $module_is_enabled = 0; eval 'use My::Special::Module'; $module_is_enabled = 1 unless $@; should do what you're looking for. j. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
