[libmojomojo-perl] 01/07: Add patch from upstream Git to fix deprecation warnings
gregor herrmann
gregoa at debian.org
Sat Dec 26 03:15:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libmojomojo-perl.
commit 7f955ec1caacad8410a644131b7149d581e3c985
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Dec 26 03:52:52 2015 +0100
Add patch from upstream Git to fix deprecation warnings
about unescaped left braces in regexps.
---
..._left_curly_braces_in_regular_expressions.patch | 123 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 124 insertions(+)
diff --git a/debian/patches/fix_deprecation_warning_for_left_curly_braces_in_regular_expressions.patch b/debian/patches/fix_deprecation_warning_for_left_curly_braces_in_regular_expressions.patch
new file mode 100644
index 0000000..546df26
--- /dev/null
+++ b/debian/patches/fix_deprecation_warning_for_left_curly_braces_in_regular_expressions.patch
@@ -0,0 +1,123 @@
+From 2dd932b6b3f6e63c027761a73e36ba8cfe00f7d8 Mon Sep 17 00:00:00 2001
+From: Doyle Young <dyoung at gmail.com>
+Date: Thu, 30 Jul 2015 22:47:43 -0400
+Subject: [PATCH] Fix deprecation warning for left curly braces in regular
+ expressions
+
+---
+ lib/MojoMojo/Declaw.pm | 6 +++---
+ lib/MojoMojo/Formatter.pm | 2 +-
+ lib/MojoMojo/Formatter/CPANHyperlink.pm | 2 +-
+ lib/MojoMojo/Formatter/Dir.pm | 2 +-
+ lib/MojoMojo/Formatter/File.pm | 2 +-
+ lib/MojoMojo/Formatter/TOC.pm | 2 +-
+ t/formatter_file.t | 2 +-
+ t/formatter_rss.t | 2 +-
+ 8 files changed, 10 insertions(+), 10 deletions(-)
+
+--- a/lib/MojoMojo/Declaw.pm
++++ b/lib/MojoMojo/Declaw.pm
+@@ -139,7 +139,7 @@
+ . '|vbs?|vbe|hta|shb|shs|hlp|chm|eml|wsf|wsh|js'
+ . '|asx|wm.|mdb|mht|msi|msp|cpl|lib|reg))';
+ my $SrcBanStd =
+-qr/^([A-Za-z]*script|.*\&{|mocha|about|opera|mailto:|hcp:|\/(dev|proc)|\\|file|smb|cid:${Executables}(@|\?|$))/i;
++qr/^([A-Za-z]*script|.*\&\{|mocha|about|opera|mailto:|hcp:|\/(dev|proc)|\\|file|smb|cid:${Executables}(@|\?|$))/i;
+
+ my %Rules = (
+
+@@ -162,7 +162,7 @@
+ "frame" => qr/^(void|above|below|hsides|vsides|lhs|rhs|box|border)$/i,
+
+ # href: Not javascript, vbs or vbscript
+- "href" => qr/^([A-Za-z]*script|.*\&{|mocha|hcp|opera|about|smb|\/dev\/)/i,
++ "href" => qr/^([A-Za-z]*script|.*\&\{|mocha|hcp|opera|about|smb|\/dev\/)/i,
+ "usemap-href" => qr/^#[A-Za-z0-9_.-]+$/, # this is not really a href at all!
+ "input-size" =>
+ qr/^(\d{1,4})$/, # some browsers freak out with very large widgets
+@@ -199,7 +199,7 @@
+ "style" => qr/^.*$/s,
+
+ #kc In addition to this, we could strip all 'javascript:|expression|' etc. from all attributes(in attribute_cleanup())
+- "stylesheet" => qr/expression|eval|script:|mocha:|\&{|\@import/i
++ "stylesheet" => qr/expression|eval|script:|mocha:|\&\{|\@import/i
+ , # stylesheets are forbidden if Embedded => 1. css positioning can be allowed in an iframe.
+ # NB see also `process_stylesheet' below
+ "style-type" => qr/script|mocha/i,
+--- a/lib/MojoMojo/Formatter.pm
++++ b/lib/MojoMojo/Formatter.pm
+@@ -105,7 +105,7 @@
+ sub gen_re {
+ my ($self, $tag, $args)=@_;
+ $args ||= '';
+- return qr[{{\s*$tag\s*$args\s*}}];
++ return qr[\{\{\s*$tag\s*$args\s*}}];
+ }
+
+
+--- a/lib/MojoMojo/Formatter/CPANHyperlink.pm
++++ b/lib/MojoMojo/Formatter/CPANHyperlink.pm
+@@ -62,7 +62,7 @@
+ my $section = qr[ .*? (?= \s* /? }} ) ]x;
+
+ $$content =~ s[
+- {{cpan \s+ ($cpan_module) (?: / ($section))? \s* \/? }}
++ \{\{cpan \s+ ($cpan_module) (?: / ($section))? \s* \/? }}
+ ] [
+ my ($module, $section) = ($1, $2);
+ if (defined $section) {
+--- a/lib/MojoMojo/Formatter/Dir.pm
++++ b/lib/MojoMojo/Formatter/Dir.pm
+@@ -59,7 +59,7 @@
+ $$content = "";
+ foreach my $line (@lines) {
+
+- if ( $line =~ m|<p>{{dir\s*(\S*)\s*(\S*)}}</p>| ) {
++ if ( $line =~ m|<p>\{\{dir\s*(\S*)\s*(\S*)}}</p>| ) {
+ my $dir = $1;
+ my $exclude = $2;
+
+--- a/lib/MojoMojo/Formatter/File.pm
++++ b/lib/MojoMojo/Formatter/File.pm
+@@ -97,7 +97,7 @@
+ my $is_image = 0;
+ foreach my $line (@lines) {
+
+- if ( $line =~ m|{{\s*file\s*(\w+)\s*(.*)}}.*| ) {
++ if ( $line =~ m|\{\{\s*file\s*(\w+)\s*(.*)}}.*| ) {
+ my $plugin=$1; # DocBook, Pod, ...
+ my $file=$2; # File, Attachment
+
+--- a/lib/MojoMojo/Formatter/TOC.pm
++++ b/lib/MojoMojo/Formatter/TOC.pm
+@@ -65,7 +65,7 @@
+ while (
+ # replace the {{toc ..}} markup tag and parse potential parameters
+ $$content =~ s[
+- {{ toc (?:$toc_params_RE)? \s* \/? }}
++ \{\{ toc (?:$toc_params_RE)? \s* \/? }}
+ ][<div class="toc">\n<!--mojomojoTOCwillgohere-->\n</div>]ix) {
+ my ($toc_h_min, $toc_h_max);
+ $toc_h_min = $1 || 1;
+--- a/t/formatter_file.t
++++ b/t/formatter_file.t
+@@ -72,7 +72,7 @@
+ # format with no plugin
+ $content = '<p>{{file $dir/test.txt}}</p>';
+ $ret = MojoMojo::Formatter::File->format_content(\$content, $c);
+-like($$ret, qr/{{file \$dir\/test.txt}}/s, "No plugin is provided");
++like($$ret, qr/\{\{file \$dir\/test.txt}}/s, "No plugin is provided");
+
+
+ # Check bad plugin
+--- a/t/formatter_rss.t
++++ b/t/formatter_rss.t
+@@ -17,7 +17,7 @@
+ my $fake_c = FakeCatalystObject->new;
+ my ($content);
+
+-content_like '/.jsrpc/render?content=%7B%7Bhttp://localhost/.rss%7D%7D', qr'{{http://localhost/.rss}}',
++content_like '/.jsrpc/render?content=%7B%7Bhttp://localhost/.rss%7D%7D', qr'\{\{http://localhost/.rss}}',
+ 'invalidate the old "syntax"';
+
+ SKIP: {
diff --git a/debian/patches/series b/debian/patches/series
index d6d0150..4b6d0b2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Unbreak-unicode.t-with-newer-Catalyst-versions.patch
+fix_deprecation_warning_for_left_curly_braces_in_regular_expressions.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmojomojo-perl.git
More information about the Pkg-perl-cvs-commits
mailing list