Subject: | Missing right brace in regex |
Tests run against Perl 5.21.11 failed with following error:
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# Failed test 'use HTML::StripScripts;'
# at t/10basic.t line 7.
# Tried to use 'HTML::StripScripts'.
# Error: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*([+-]?\d{1,20}(?:\.\d{ <-- HERE 1,20)?)\s*((?:\%|\*|ex|px|pc|cm|mm|in|pt|em)?)\s*$/ at /builddir/build/BUILD/HTML-StripScripts-1.05/blib/lib/HTML/StripScripts.pm line 1633.
# Compilation failed in require at t/10basic.t line 7.
# BEGIN failed--compilation aborted at t/10basic.t line 7.
Can't locate object method "_hss_prepare_ban_list" via package "HTML::StripScripts" at /builddir/build/BUILD/HTML-StripScripts-1.05/blib/lib/HTML/StripScripts.pm line 411.
# Looks like you planned 9 tests but ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test exited with 255 just after 1.
t/10basic.t ............
The right brace is missing in the regex.
The patch with fix is attached.
Subject: | HTML-StripScripts-1.05-Fix-typo-in-regex.patch |
diff -up HTML-StripScripts-1.05/StripScripts.pm.orig HTML-StripScripts-1.05/StripScripts.pm
--- HTML-StripScripts-1.05/StripScripts.pm.orig 2015-05-05 09:12:33.495920443 +0200
+++ HTML-StripScripts-1.05/StripScripts.pm 2015-05-05 09:53:33.099908066 +0200
@@ -1630,7 +1630,7 @@ size or length.
sub _hss_attval_size {
$_[3]
- =~ /^\s*([+-]?\d{1,20}(?:\.\d{1,20)?)\s*((?:\%|\*|ex|px|pc|cm|mm|in|pt|em)?)\s*$/i
+ =~ /^\s*([+-]?\d{1,20}(?:\.\d{1,20})?)\s*((?:\%|\*|ex|px|pc|cm|mm|in|pt|em)?)\s*$/i
? lc "$1$2"
: undef;
}