List Info

Thread: Re: Callbacks for named captures (%+ and %-)




Re: Callbacks for named captures (%+ and %-)
user name
2007-05-31 18:17:19
On 6/1/07, Ævar Arnfjörð Bjarmason <avarabgmail.com> wrote:
> On 5/31/07, Gerard Goossen <gerardtty.nl> wrote:
> > Because we make the re::regnames normal functions
to access the buffers
> > (which I'm very happy about). I think they should
move to a different
> > namespace. The 're' pragma is used to
"*alter* regular expression
> > behaviour".
> > Because the 're::regname*' are subs to access
things they don't belong
> > there.
> > I'm thinking about 'regex' namespace. Also I would
like them renamed,
> > I like 'named_buff', like what they are called
internally. So we get
> > "regexp::named_buff"
> > (is_regexp should also move to the new
namespace).
>
> Maybe the debug engine should be in
re::engine::Perl:ebug and
the
> utility functions in re.pm?

So long as they exist in universal.c id have no problem with
that.

> But yes, right now you're required to load the debug
engine to find
> out whether something is a regexp unless you count on
the fact that
> re::is_regexp is compiled into the miniperl binary
which I don't think
> is an idea interface.

I do. It should always be available. Always. Without loading
re.pm even.

> I think re.pm should only contain things directly
related to the debug engine.

Its a bit of a mixed bag already. IOW, that horse has
already bolted.

use re 'eval';

etc...

so we are stuck with the current mixed usage of the re
namespace.
Therefore in my opinion there is no point in discussing
purity of the
namespace any further.

cheers,
Yves

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

Re: Callbacks for named captures (%+ and %-)
user name
2007-05-31 20:22:00
On 5/31/07, demerphq <demerphqgmail.com> wrote:
> use re 'eval';
>
> so we are stuck with the current mixed usage of the re
namespace.
> Therefore in my opinion there is no point in discussing
purity of the
> namespace any further.

I don't want namespace purity, but I do agree with Gerard
that re.pm
shouldn't contain utility functions, or rather that they
should be
seperated from perl's debug engine.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )