in reply to Re^2: How is it that I can see this package variable from another package without fully-qualifying its name?
in thread How is it that I can see this package variable from another package without fully-qualifying its name?
Maybe I'm confusing "change of package" with "change of scope"?
Exactly! The package keyword doesn't introduce a new scope for my or our bindings. Only a new file or curly braces do.
Keeping each package in a separate file is generally the best approach, but using curly braces to isolate packages works well too. Perl 5.14 has a new package NAME { ... } syntax to make this even easier.
|
|---|