I have a module with several packages declared in them. Here's a minimal example:
#!/usr/bin/env perl use strict; use warnings; package Foo; my $package = __PACKAGE__; package Bar; my $package = __PACKAGE__;
and perl -c gives:
"my" variable $package masks earlier declaration in same scope at junk +.pm line 9.
Is this expected?
Is there a better solution?
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to my $var masked across package scope? by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |