develooper Front page | perl.perl5.porters | Postings from August 2010

Re: qr stringification: why are xism always present? I'm worried about backward compatibility

Thread Previous | Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
August 2, 2010 17:53
Subject:
Re: qr stringification: why are xism always present? I'm worried about backward compatibility
Message ID:
AANLkTinB_RHB_-rEtT0z+D1WZ2zpAu2=6O7wUxEujinT@mail.gmail.com
On Tue, Aug 3, 2010 at 00:09, karl williamson <public@khwilliamson.com> wrote:

> But I do have a related implementation question.  perlreapi.pod describes
> how one can plug-in another regex handler.  I believe that 'use re debug' is
> such a plug-in.  What I don't see is how the writer of some other similar
> plug-in gets access to the various flag #defines, such as RXf_PMf_LOCALE,
> which is listed in the pod.  I've scanned the XS documentation, and don't
> see how such a module gets access to the flag #defines used in a general
> function.  Can they use any perl header?  If so, we have lots more backward
> compatibility worries than I thought. The only place that I see some of
> these exported is in defsubs.h, but I think that is only for the B module,
> but I'm pretty clueless about that whole area of Perl.  Any answers, advice
> or documentation pointers would be appreciated.

Yes, the RXf_PMf_* flags are available to everyone. They're in
regexp.h which is used by perl.h. So every XS extension has access to
them.

This isn't something you should worry about a lot though. The regexp
interface is still experimental, and existing modules broke completely
in 5.12. Most of the re::engine::* stuff on CPAN doesn't work with
5.12, although Vincent made re::engine::Plugin work on both 5.10 and
5.12.

The perlreapi.pod still documents the API as it was in 5.10 though, it
wasn't updated for those 5.10 -> 5.12 changes.

The RXf_PMf_* flags also used to be called just RXf_* until late 2006
when Yves changed them in bbe252da68.

You might have to worry about a lot of stuff when getting this patch
through, breaking the regex "API" isn't one of them.

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