develooper Front page | perl.perl5.porters | Postings from May 2004

intercepting qr// (not via overload.pm)

From:
Jeff 'japhy' Pinyan
Date:
May 2, 2004 09:58
Subject:
intercepting qr// (not via overload.pm)
Message ID:
Pine.LNX.4.44.0405021245300.17468-100000@perlmonk.org
I'd like to intercept qr//, after it's done its interpolation of
variables, but BEFORE it is parsed by the regex engine.

I looked at pp_qr() in pp_hot.c, but that's just taking a regex and doing
things to it, so I need to get at the regex text before then.

I know that MJD wrote replacement regcomp and regexec files re.pm, but
that's deeper than I need, I think.  I'd just like to intercept the raw
regex before it's parsed by regcomp, so I can filter the WHOLE thing.

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
CPAN ID: PINYAN    [Need a programmer?  If you like my work, let me know.]
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About