$ perl -Mre=eval -e '/ (??{ eval "qr<(?{1})>" }) $_ /x'
$ perl -Mre=eval -e '/ (??{ eval "q<(?{1})>" }) $_ /x'
Eval-group not allowed ...
perlre has an explicit distinction for interpolating
qr// objects (under (?{}) instead). The problem is
that I do use re "eval", but perl seems to forget.
It does seems a little bug-ish, I'll perlbug it.
perlre: (?{ })
For reasons of security, this construct is forbidden if
the regular expression involves run-time
interpolation of variables, unless the perilous
"use re 'eval'" pragma has been used (see re),
or the variables contain results of "qr//"
operator (see "qr/STRING/imosx" in perlop).
|