File: unescaped-left-brace-in-regex.patch

package info (click to toggle)
pangzero 1.4.1%2Bgit20121103-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,640 kB
  • sloc: perl: 4,105; makefile: 24
file content (24 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Markus Koschany <apo@debian.org>
Date: Wed, 8 Jun 2016 08:37:41 +0200
Subject: unescaped left brace in regex

Fix deprecation warning for unescaped left brace in regex which will become
fatal with Perl 5.26.

Forwarded: https://github.com/kthakore/pangzero/issues/4
---
 lib/Games/PangZero/Config.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Games/PangZero/Config.pm b/lib/Games/PangZero/Config.pm
index eb26d05..72a9c4f 100644
--- a/lib/Games/PangZero/Config.pm
+++ b/lib/Games/PangZero/Config.pm
@@ -104,6 +104,7 @@ sub LoadConfig {
   foreach $varname (GetConfigVars()) {
     my $pattern = $varname;
     $pattern    =~ s/\[/\\[/g;
+    $pattern    =~ s/\{/\\{/g;
     if ($text =~ /$pattern = (.+?)$/m) {
       $val = $1;
       if ($varname eq Games::PangZero::ShowWebsite) {