|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re^2: 'local' for imported variables doesn't work as expected (1 update)by LanX (Saint) |
| on Oct 04, 2024 at 11:54 UTC ( [id://11162055]=note: print w/replies, xml ) | Need Help?? |
|
Tl;Dr , but I don't think there is anything wrong with Exporter it's just the way local works. (See my other post which replicates the problem without Exporter) It's localizing the symbol NOT the referenced variable. Otherwise it would be possible to localize lexical variables too.
UpdateDemo in the debugger
Now exporting typeglobs works because the scalar slot is one level deeper, hence local will operate on the same slot
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||