Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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.

Comment on Re: How do you use the if pragma?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027555]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-11-30 04:46 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (757 votes), past polls