in reply to What's wrong with this local() ?
local $A::variable = $A::variable;
gives the desired behavior. It's nice, but it doesn't have to be that way, because this behavior implies that the "local" was executed after the RHS of the assignment was evaluated.
Having said that, I don't think that precidence relationship is clearly defined in the language, and you probably shouldn't trust it for production code. Unless someone older and wiser than I knows for sure that it was planned that way?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What's wrong with this local() ?
by Anonymous Monk on Jan 31, 2008 at 17:52 UTC | |
by ikegami (Patriarch) on Jan 31, 2008 at 18:37 UTC | |
|
Re^2: What's wrong with this local() ?
by ikegami (Patriarch) on Jan 31, 2008 at 18:02 UTC |