From 604d0391ba2d372f8de6efd364e9978fb11e4f92 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 14 Jun 2015 21:35:51 -0400 Subject: [PATCH] Squelch regex deprecation warnings from Perl 5.22. Specifically: "Unescaped left brace in regex is deprecated, passed through in regex" --- IkiWiki/Plugin/teximg.pm | 4 ++-- pm_filter | 2 +- t/inline.t | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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{