Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: How do you use the if pragma?

by hdb (Prior)
on Apr 08, 2013 at 16:25 UTC ( #1027555=note: print w/replies, xml ) Need Help??

in reply to How do you use the if pragma?

Proposal to find an answer: write a script using File::Find to iterate over @INC to see whether "use if" is used anywhere and to what purpose. ;)

UPDATE: Here is the script.

use strict; use warnings; use File::Find; find( sub { my $f = $File::Find::name; return unless $f =~ /\.p(l|m)$/; return unless open my $fh, "<", $f; while(<$fh>){ print "$f: $_" if /^\s*use if/; } close $fh; }, @INC );

Just one hit on my machine. "use if" seems to be unpopular.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-01-23 23:19 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (199 votes). Check out past polls.