develooper Front page | perl.perl5.porters | Postings from April 2006

Re: A user pragma example

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
April 8, 2006 09:42
Subject:
Re: A user pragma example
Message ID:
20060408164225.GB32132@plum.flirble.org
On Mon, Apr 03, 2006 at 10:51:44AM -0500, David Nicol wrote:
> On 4/1/06, Nicholas Clark <nick@ccl4.org> wrote:
> 
> > No. It's going to need the games with caller, rather than accessing %^H,
> > simply because the information it needs to get is stored in the very structure
> > that caller already reads.
> >
> > Nicholas Clark
> 
> would
> 
>     sub HINTS(){(caller(1))[10]};
> 
> allow further code in the module to refer to
> 
>    HINTS->{myhint}
> 
> also,
> 
> would
> 
>     sub MYHINT(){(caller(1))[10]->{myhint}};
> 
> allow further code in the module to refer to
> 
>    MYHINT

I think so. Why not just try it? :-)

Nicholas Clark

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