Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Why $File::Find::prune = 1 returns used only once error

by haukex (Archbishop)
on Apr 17, 2021 at 07:56 UTC ( [id://11131401]=note: print w/replies, xml ) Need Help??


in reply to Re: Why $FIle::Find::prune = 1 returns used only once error
in thread Why $FIle::Find::prune = 1 returns used only once error

If asked for default imports, File::Find apparently does some magic to make $File::Find::prune known that is not done if you explicitly import only the find procedure.

No, it has nothing to do with import.

Bar.pm:

package Bar; use warnings; use strict; our $x; 1;

foo.pl:

use warnings; use strict; use FindBin; use lib $FindBin::Bin; #use Bar; # no warning #use Bar (); # no warning #BEGIN { require Bar; } # no warning require Bar; # warning when var used only once $Bar::x = 1; # warning with plain 'require' #$Bar::x = $Bar::x = 1; # no warning

Edit: Added use Bar (); example.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-23 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found