]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Squelch regex deprecation warnings from Perl 5.22.
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Mon, 15 Jun 2015 01:35:51 +0000 (21:35 -0400)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Mon, 15 Jun 2015 01:35:51 +0000 (21:35 -0400)
Specifically:

"Unescaped left brace in regex is deprecated, passed through in regex"

IkiWiki/Plugin/teximg.pm
pm_filter
t/inline.t

index 3d6fa9942c11f3dd304026458655b22ab30e5e50..e0f97614b9bf29e7424857e45041ca668c7e449a 100644 (file)
@@ -146,8 +146,8 @@ sub gen_image ($$$$) {
        my $tex = $config{teximg_prefix};
        $tex .= '\['.$code.'\]';
        $tex .= $config{teximg_postfix};
-       $tex =~ s!\\documentclass{article}!\\documentclass[${height}pt]{article}!g;
-       $tex =~ s!\\documentclass{scrartcl}!\\documentclass[${height}pt]{scrartcl}!g;
+       $tex =~ s!\\documentclass\{article}!\\documentclass[${height}pt]{article}!g;
+       $tex =~ s!\\documentclass\{scrartcl}!\\documentclass[${height}pt]{scrartcl}!g;
 
        my $tmp = eval { create_tmp_dir($digest) };
        if (! $@ &&
index 1e51f9dd347c79e738d4aa9b4ef33da86aeafbfa..8e1480564af9400e050c32ed634d6cc1beb64a97 100755 (executable)
--- a/pm_filter
+++ b/pm_filter
@@ -28,6 +28,6 @@ elsif (/^use lib/) {
 elsif ($. == 1 && ($ENV{NOTAINT}=0) && m{^(#!.*perl.*?)$}) {
        $_=qq{$1 -T\n};
 }
-elsif (/^\$ENV{PATH}="(.*)";/) {
+elsif (/^\$ENV\{PATH}="(.*)";/) {
        $_="\$ENV{PATH}=\"$1:$prefix/bin\";\n";
 }
index f2ffbbc2f6bdaeec36e48f7e4376e8721b2a8ac1..9bad525be3b1d2a51aa81fd05f850efc604c433a 100755 (executable)
@@ -52,7 +52,7 @@ $blob = readfile("t/tmp/out/friends.html");
 like($blob, qr{\Q$add_new_post\E}, 'postform=yes forces postform');
 like($blob, qr{<input type="hidden" name="from" value="friends"},
        'implicit rootpage is /friends');
-like($blob, qr[this page is {friends/garrus}.*this page is {friends/liara}]s,
+like($blob, qr[this page is \{friends/garrus}.*this page is \{friends/liara}]s,
        'first two pages in desired sort order are present');
 unlike($blob, qr{friends/(?:midna|telma)},
        'pages excluded by show should not be present');
@@ -62,7 +62,7 @@ unlike($blob, qr{\Q$add_new_post\E}, 'default is no postform');
 
 $blob = readfile("t/tmp/out/enemies.html");
 unlike($blob, qr{\Q$add_new_post\E}, 'postform=no forces no postform');
-like($blob, qr[this page is {enemies/zant}.*this page is {enemies/rachni}]s,
+like($blob, qr[this page is \{enemies/zant}.*this page is \{enemies/rachni}]s,
        'first two pages in reversed sort order are present');
 unlike($blob, qr{enemies/(?:benezia|geth)},
        'pages excluded by show should not be present');