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 08:30
Subject:
Re: [perl #80628] [PATCH] __SUB__
Message ID:
AANLkTi=jz4y5NqVQoXgWYyVgHK7AjNp+JAHuLF=EnnLi@mail.gmail.com
On 13 December 2010 17:09, Elizabeth Mattijsen <liz@dijkmat.nl> wrote:
> On Dec 13, 2010, at 5:05 PM, demerphq wrote:
>> On 13 December 2010 13:59, Zefram <zefram@fysh.org> wrote:
>>> demerphq wrote:
>>>> This is why i proposed using a $^THIS_SUB "magic tied var" for the purpose.
>>>
>>> A variable is a poor model for this.  I think it's best accessed via
>>> something that looks like a function call.  __SUB__ would be fine,
>>> except for the convention of __FOO__ denoting a compile-time constant.
>>
>> Yes. But I think people can deal with that, it isnt much different
>> from __PACKAGE__.
>
> Please note that __PACKAGE__ and __LINE__ are settable nonetheless, using #line and -package- .

Yes I did consider that. But in both cases you dont modify __PACKAGE__
directly, but instead via some other mechanism.

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