From: Amitai Schlair Date: Mon, 15 Jun 2015 01:35:51 +0000 (-0400) Subject: Squelch regex deprecation warnings from Perl 5.22. X-Git-Tag: 3.20160121~166 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/604d0391ba2d372f8de6efd364e9978fb11e4f92?ds=sidebyside Squelch regex deprecation warnings from Perl 5.22. Specifically: "Unescaped left brace in regex is deprecated, passed through in regex" --- diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 3d6fa9942..e0f97614b 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -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 (! $@ && diff --git a/pm_filter b/pm_filter index 1e51f9dd3..8e1480564 100755 --- 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"; } diff --git a/t/inline.t b/t/inline.t index f2ffbbc2f..9bad525be 100755 --- a/t/inline.t +++ b/t/inline.t @@ -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{