On Sat, Aug 02, 2003 at 04:33:19PM -0700, Michael G Schwern wrote:
> > Damian Conway <[EMAIL PROTECTED]> writes:
> > >Hence, making C<%_> mean something different in core Perl 5 might possibly be
> > >"forwards incompatible".
>
> Representing the Backwards Compatiblity Police, I've had co-workers use
> %_ as the globalist of all global hashes. %_ transends all packages and
> scopes and Perl does not localize it, touch it or use it as it does @_ and
> $_. In the particular case I'm thinking of, it was used to hold global
> arguments for function calls in a template system. Rather insane, really.
> Lots of better ways to do it and clearly making use of an undefined
> language feature.
>
> I'm not making an argument against %_, just noting that *_ is used
> opportunisticly and you will break a few programs.
I am fond of doing
local %_ = @_;
as one of the first statements of a subroutine. That, or
my %args = @_;
I like the latter because it uses a lexical variable, but I like the
former because %_ fits with @_ and $_.
Abigail