Re: RFC 308 (v1) Ban Perl hooks into regexes
[email protected] (Piers Cawley) 26 Sep 2000 09:59:03 +0100
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <[email protected]> |
Perl6 RFC Librarian <[email protected]> writes: > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1 TITLE > > Ban Perl hooks into regexes > > =head1 VERSION > > Maintainer: Simon Cozens <[email protected]> > Date: 25 Sep 2000 > Mailing List: [email protected] > Number: 308 > Version: 1 > Status: Developing > > =head1 ABSTRACT > > Remove C<?{ code }>, C<??{ code }> and friends. > > =head1 DESCRIPTION > > The regular expression engine may well be rewritten from scratch or > borrowed from somewhere else. One of the scarier things we've seen > recently is that Perl's engine casts back its Krakken tentacles into Perl > and executes Perl code. This is spooky, tangled, and incestuous. > (Although admittedly fun.) It's *loads* of fun. Though admittedly, I've not used it in any *real* code yet... > It would be preferable to keep the regular expression engine as > self-contained as possible, if nothing else to enable it to be used > either outside Perl or inside standalone translated Perl programs > without a Perl runtime. > > To do this, we'll have to remove the bits of the engine that call > Perl code. In short: C<?{ code }> and C<??{ code }> must die. You don't *have* to remove 'em. You can just throw an exception during compilation if some hypothetical 'no regex subs' pragma is there. -- Piers '063039183598121887134041122600:1917131105:Jaercunrlkso tPh.'=~/^(.{6})* (.{6})[^:]*:(..)*(..).*:(??{'.{'.$2%$4.'}'})(.)(??{print$5})/x;print"\n"