From e43df1c810c579f687d22501567455eb921d5b8a Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sat, 20 Jan 2018 15:29:36 +0100 Subject: [PATCH] fix for unescaped left brace (RT #124146) --- lib/Module/ExtractUse.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Module/ExtractUse.pm b/lib/Module/ExtractUse.pm index 51c9887..fa745e9 100644 --- a/lib/Module/ExtractUse.pm +++ b/lib/Module/ExtractUse.pm @@ -32,13 +32,13 @@ sub new { my $re_block; $re_block = qr { ( # eval BLOCK, corresponding to the group 10 in the entire regex - { + \{ ((?: (?> [^{}]+ ) # Non-braces without backtracking | (??{$re_block}) # Recurse to group 10 )*) - } + \} ) }xs; my $re = qr{ @@ -63,13 +63,13 @@ my $re = qr{ (?:(['"])(.*?)\8) # eval '' or eval "", group 8, group 9 | ( # eval BLOCK, group 10 - { + \{ ((?: # group 11 (?> [^{}]+ ) # Non-braces without backtracking | (??{$re_block}) # Recurse to group 10 )*) - } + \} ) )) ) -- 2.1.4