diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-06 06:41:17 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-06 06:41:17 +0000 |
commit | e4d48cc9bddb8984cf12bdfbcbac9580d192b5a5 (patch) | |
tree | 3f490d6e52093c5f09c5b80a219d66b0ab159c02 /regcomp.c | |
parent | 06b3afcdfc1f3e17cec01aa39ec73f3f3165a28e (diff) | |
download | perl-e4d48cc9bddb8984cf12bdfbcbac9580d192b5a5.tar.gz |
allow eval-groups in patterns only if they C<use re 'eval';>
p4raw-id: //depot/perl@1334
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1043,6 +1043,13 @@ reg(I32 paren, I32 *flagp) regcomp_rx->data->data[n+2] = (void*)sop; SvREFCNT_dec(sv); } else { /* First pass */ + if (curcop == &compiling) { + if (!(hints & HINT_RE_EVAL)) + FAIL("Eval-group not allowed, use re 'eval'"); + } + else { + FAIL("Eval-group not allowed at run time"); + } if (tainted) FAIL("Eval-group in insecure regular expression"); } |