Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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]
[erix]: indeed had to be( time make check-world ) > test_run2.output 2>&1
[erix]: probably misremembered because of 2>&1 |
[erix]: oh nice, can do |& nowadays. Learned something new after all
LanX flagelates erix with a signed markov chain
[erix]: oh well, it's holy week, right? Thick-skin week. I just read that in the Philippines, some RCs practice self-crucifixion. Tough cookies I'd like to see
[LanX]: already?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-03-23 08:57 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.