Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Avoid using a module if it's not available

by jacques (Priest)
on Jun 12, 2008 at 22:29 UTC ( #691810=note: print w/replies, xml ) Need Help??

in reply to Avoid using a module if it's not available

use HTML::Perlinfo::Modules; my $m = HTML::Perlinfo::Modules->new(); my $module = $m->print_modules( show_only => qr/FOO::bar/i ); if ($module) { my $foobarzlot=sprintf("%d,",bar(FILE)->zlot); print "FOOBARZLOT=".$foobarzlot."\n"; }
Note that it is very easy to look up multiple modules by simply adding them to the precompiled regular expression. For example:
my $modules = $m->print_modules( show_only => qr/FOO::bar|File::Which| +File::stat/i );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://691810]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-06-28 16:13 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (640 votes). Check out past polls.