"be consistent" | |
PerlMonks |
Re^4: Accessing Arguments inside Subroutines via @_by LanX (Saint) |
on Mar 21, 2015 at 17:10 UTC ( [id://1120844]=note: print w/replies, xml ) | Need Help?? |
I just wanted to highlight why it makes sense that assigning to @_ doesn't write thru to the aliases. my and local were already mentioned in my footnote, when using typeglobs I'd strongly suggest to prefer *b = \$a; over *b = *a; But these mechanisms are no big help if you want named parameters in subs cause those are lexicals, (which should be the preferred variable flavor). > I'd not be surprised at all if there were CPAN modules that implemented this. see Data::Alias or Lexical::Alias and their discussion in PBP Perl6 aims to handle aliasing consistently.
In Section
Seekers of Perl Wisdom
|
|