[sf-perl] oddity with an exported and localized variable
not.com at gmail.com
Thu Nov 26 08:24:18 PST 2009
Running in perl 5.10.1 shows:
initial value: initial
the new value: new value
exported_variable: new value
that is, same as what you saw in 5.10.0
Based on the perlsub section "Temporary Values via local()":
A "local" modifies its listed variables to be "local" to the
block, "eval", or "do FILE"--*and to any subroutine called from
* *that block*. A "local" just gives temporary values to global
package) variables. It does not create a local variable. This is
known as dynamic scoping. ...
Emphasis is in the original perldoc. So it looks like a bug to me too. Bring
it to the monks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SanFrancisco-pm