good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Your right it's not consistent.
But IMHO consistency will most likely break legacy code. I think that there should at least be a warning. Since it's not always clear if a variable is an alias, this can cause very hard to detect errors in subs which are meant to modify call-by-reference parameters. (not to be confused with Perl references) Did you check if there are already older bug-reports regarding this? Cheers Rolf UPDATE:
but
When passing an aliasing variable instead of 1 it's the same problem. With inc_b non-aliasing vars will increment, but aliases will silently fail to increment. In reply to Re^3: ref to read-only alias ... why? (not consistent)
by LanX
|
|