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

Re: how should %^H work with lexical pramas

Thread Previous | Thread Next
March 28, 2006 23:22
Re: how should %^H work with lexical pramas
Message ID:
On 3/28/06, Nicholas Clark <> wrote:
> Logically, it seems, the way to go is to add something to make accesses of %^H
> at run time report the state of the compile time lexical pragmata. %^H should
> therefore be read only at runtime.

Im a little confused about why %^H needs to be read only at run time.

As an example id like to use lexical pragmatta to control the regex
debug mode better.

And to do this, having the abilitiy to set %^H at both compile time
and run time seems useful. Currently we have the following:


Setting this at either compile time or run time is useful.

More importantly at run time you need to know what was set at compile
time, but you also need the ability to change it at run time.

So for instance lets say you want to debug how a particular regex is
going to match against a particular string.  To do that you need to be
able to compile the regex in compile debug mode, and then later on
change the debug mode to debug execute.

Maybe there are other ways of handling this, and my points are not
relevent. But at this point it seems to me that for lexical pragmatta
to be really useful you need both compile time and run time ability to
change the pragmatta state.


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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About