Re: %_ - is it available for use?

2003-08-14 Thread Rafael Garcia-Suarez
david nicol wrote: > [EMAIL PROTECTED] perl -le '$_{a}=27; package notmain; print $_{a}' > 27 > > Gosh! > > Let's document it! Would it go in perlvar or perlsyn? It's already documented, in perlvar/"Technical Note on the Syntax of Variable Names" (at the end)

Re: %_ - is it available for use?

2003-08-06 Thread david nicol
On Sat, 2003-08-02 at 18:33, Michael G Schwern wrote: > 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 par

Re: %_ - is it available for use?

2003-08-06 Thread Michael S. Joyce
Odd. I always though that you could do that. Maybe it was just an assumption I made without understanding. I've used %_ in one liners to remove duplicates and other such fun. Michael On Tue, 2003-08-05 at 21:36, david nicol wrote: > On Sat, 2003-08-02 at 18:33, Michael G Schwern wrote: > > > Rep

Re: %_ - is it available for use?

2003-08-03 Thread Abigail
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

Re: %_ - is it available for use?

2003-08-02 Thread Michael G Schwern
On Sat, Aug 02, 2003 at 08:16:19PM -0700, Larry Wall wrote: > On Sat, Aug 02, 2003 at 04:33:19PM -0700, Michael G Schwern wrote: > : I'm not making an argument against %_, just noting that *_ is used > : opportunisticly and you will break a few programs. > > Not necessarily. If Perl 6 were to us

Re: %_ - is it available for use?

2003-08-02 Thread Larry Wall
On Sat, Aug 02, 2003 at 04:33:19PM -0700, Michael G Schwern wrote: : I'm not making an argument against %_, just noting that *_ is used : opportunisticly and you will break a few programs. Not necessarily. If Perl 6 were to use %_ as parameter name, it would be lexically scoped, and hide any pac

Re: %_ - is it available for use?

2003-08-02 Thread Michael G Schwern
On Sun, Aug 03, 2003 at 01:37:16AM +0200, Abigail wrote: > 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

Re: %_ - is it available for use?

2003-08-02 Thread Michael G Schwern
> 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

Re: %_ - is it available for use?

2003-08-02 Thread Nick Ing-Simmons
Damian Conway <[EMAIL PROTECTED]> writes: > > From a Perl 6 perspective, it seems likely that C<%_> will be the name >commonly used for the "slurpy hash" of a subroutine. Just as C<@_> will often >be the name used for the "slurpy array". See Exegesis 6 for more details. > >Indeed, when it comes t

Re: %_ - is it available for use?

2003-08-01 Thread Damian Conway
Nick Ing-Simmons wrote: We have been discussing how to pass data to Tk callbacks. In particular Entry widget validation routines. There are a number of items that they _might_ be interested in but a typical routine would only use a few. Currently it passes them all as positional parameters. One

%_ - is it available for use?

2003-08-01 Thread Nick Ing-Simmons
We have been discussing how to pass data to Tk callbacks. In particular Entry widget validation routines. There are a number of items that they _might_ be interested in but a typical routine would only use a few. Currently it passes them all as positional parameters. One idea that occured to me/