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

Re: how should %^H work with lexical pramas

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
March 29, 2006 05:14
Subject:
Re: how should %^H work with lexical pramas
Message ID:
20060329151517.31cb8ef0@grubert.mandriva.com
Nicholas Clark wrote:
> And given that you might want to implement your pragma with more than one
> level of subroutine, I infer that you might need to get at $^{foo} from
> somewhere up your caller's scope. This starts to sound like the correct
> hash should be returned as another value from caller.

Just like the warnings bitfield, yes.

> I was thinking, if at runtime you change the caller's %^H, should that change
> be reflected in any subsequent string eval they perform? If so, this would
> mean that eval should be getting its (local compile time) %^H from the
> current scope's run time %^H-a-like. (The %^H result from caller(-1), not
> that caller(-1) is legal)

Yes, currently hints aren't propagated in eval("") (except a few ones,
ie. some strictures and all warnings).

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