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.
|
|---|