Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Cannot compile eval group RegExp at runtime #62

Open
atoomic opened this issue Jul 18, 2017 · 0 comments
Open

Cannot compile eval group RegExp at runtime #62

atoomic opened this issue Jul 18, 2017 · 0 comments

Comments

@atoomic
Copy link
Collaborator

atoomic commented Jul 18, 2017

$a = qr/(?{++$b})/;
$b = 7;
print qq[ok\n] if /$a$a/ && $b eq '9';

oneliner

> perlcc -r -e '$a = qr/(?{++$b})/; $b = 7; print qq[ok\n] if /$a$a/ && $b == 9;'
Eval-group not allowed at runtime, use re 'eval' in regex m/(?^:(?{++$b}))(?^:(?{++$b}))/ at -e line 1.

we are recompiling the RegExp at INIT time

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants