...can lead to "undefined variable"-warnings
Could you provide an example? I think you're fine as long as you make sure the code has loaded/compiled before you access the variables (using use or require within a BEGIN block):
---- X.pm ---- $::foo = "foo"; $::bar = "bar"; -------------- #!/usr/bin/perl use strict; use warnings; use X; # or BEGIN { require X; } print "$::foo\n"; # no warnings
In reply to Re^3: Variables in a single file
by almut
in thread Variables in a single file
by northwestdev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |