]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
solver: quiet complex regexp warning for old Perl
authorEric Wong <e@80x24.org>
Sat, 11 May 2024 23:29:40 +0000 (23:29 +0000)
committerEric Wong <e@80x24.org>
Mon, 13 May 2024 02:48:16 +0000 (02:48 +0000)
I'm not sure when the actual recursion limit was removed,
but the warning was removed for Perl 5.37.1.  In any case,
it's probably not worth doing anything about for older Perls
it since it's rarely triggered and it seems nobody cares too
much about solver, anyways :<

lib/PublicInbox/SolverGit.pm

index 296e7d17841564279b8993b73655ce9354d4e551..7984af43630c0a9585239ddcb054c66de92d64ea 100644 (file)
@@ -136,6 +136,12 @@ sub extract_diff ($$) {
        if ($cte =~ /\bquoted-printable\b/i && $part->crlf eq "\n") {
                $s =~ s/\r\n/\n/sg;
        }
+
+       # Quiet "Complex regular subexpression recursion limit" warning.
+       # Not much we can do about it, but it's no longer relevant to
+       # Perl 5.3x (the warning was removed in 5.37.1, and actual
+       # recursino sometime before then).
+       no warnings 'regexp';
        $s =~ m!( # $1 start header lines we save for debugging:
 
                # everything before ^index is optional, but we don't