Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Moritz
> Symbolic deferences only look in the symbol table, not in the lexical pad. A reason for that is that lexical variables can be removed from an outer pad when taking a closure, and allowing symbolic differentiation would defeat that optimization. sorry I don't understand this argumentation, if you want to make a symderef on a lexical you can always use eval. The optimization shouldn't be bothered about this possibility. If ever it fails because of optimization, it's in the responsibility of the hacker, like eval is. so why shouldn't there be a symderef for lexicals, that actually does an eval??? the reason why perl 5 can't do this out of the box, is IMHO most probably that lexicals were too new to consider all use-cases... Cheers LanX In reply to Re^4: Indirect variable name
by LanX
|
|