in reply to do, local and a qualified identifier?
> what is the value of $Foo::bar in the main script and why?
42. Because Foo::init() sets the package variable explicitly.
As for the local(), that has no effect on the scope inside of the init.
Is there something else happening in the larger context (or maybe that's a remnant of the boilerplate config where it is sometimes required?) It's probably the latter — an onion in the varnish.
Qualifying with the package name? As opposed to setting the value of any random $bar? If you didn't declare it with our(), it won't work under strict.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: do, local and a qualified identifier?
by ikegami (Patriarch) on Oct 09, 2005 at 16:42 UTC | |
by ewilhelm (Novice) on Oct 09, 2005 at 23:23 UTC |