develooper Front page | perl.perl5.porters | Postings from December 2010

Re: [perl #80628] [PATCH] __SUB__

Thread Previous | Thread Next
From:
demerphq
Date:
December 13, 2010 01:41
Subject:
Re: [perl #80628] [PATCH] __SUB__
Message ID:
AANLkTimK7t4HD0Yibkm8V3TGNWfnOEQin7XpNwfhhs6d@mail.gmail.com
On 13 December 2010 10:29, demerphq <demerphq@gmail.com> wrote:
> On 13 December 2010 10:26, demerphq <demerphq@gmail.com> wrote:
>> On 12 December 2010 21:26, Father Chrysostomos
> [snip]
>>> The really neat thing, which I realised only after writing it, is that it allows for recursive closures to be written much more simply:
>
> And this was exactly the reason i recommended a $^SUB "tied" variable
> for this purpose. Again, great idea. ++ to you.
>
> Perhaps if the back compat police dislike __SUB__ you can make it work
> with $^SUB.

For the record: I originally proposed it be called ${^THIS_SUB} (which
IS reserved - and special by nature iirc) in

Message-ID: <9b18b3110706261235y5ea26d9w516e8444b293c32d@mail.gmail.com>
Date: Tue, 26 Jun 2007 21:35:26 +0200
From: demerphq <demerphq@gmail.com>
To: p5p <perl5-porters@perl.org>
Subject: What about a ${^THIS_SUB} variable?

In that thread Rafael replied with the module Sub::Current on cpan
where it is exported as  ROUTINE()

http://search.cpan.org/~rgarcia/Sub-Current-0.02/lib/Sub/Current.pm

It was also discussed in a number or other threads.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About