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

Re: how should %^H work with lexical pramas

Thread Previous | Thread Next
From:
demerphq
Date:
March 28, 2006 23:22
Subject:
Re: how should %^H work with lexical pramas
Message ID:
9b18b3110603282322o4fed18d1j98bb2a49279b8f55@mail.gmail.com
On 3/28/06, Nicholas Clark <nick@ccl4.org> 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:

    ${^RE_TRIE_MAXBUFF}
    ${^RE_DEBUG_FLAGS}

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.

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