[libcgi-formbuilder-perl] 01/02: Add patches from pkgsrc, and an extra similar patch, to avoid warnings about calling CGI->param in list context with recent CGI.pm

gregor herrmann gregoa at debian.org
Fri Oct 24 20:02:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libcgi-formbuilder-perl.

commit 5742e58526ff78b30e8bdadb9f1d7d50270b59ba
Author: Simon McVittie <smcv at debian.org>
Date:   Thu Oct 16 10:43:30 2014 +0100

    Add patches from pkgsrc, and an extra similar patch, to avoid warnings about calling CGI->param in list context with recent CGI.pm
---
 debian/changelog                                   |  5 +++++
 ...nneeded-warning-from-CGI.pm-4.05-or-newer.patch | 22 ++++++++++++++++++++++
 ...nneeded-warning-from-CGI.pm-4.05-or-newer.patch | 22 ++++++++++++++++++++++
 ...-use-of-param-that-will-cause-a-warning-i.patch | 21 +++++++++++++++++++++
 ...t-cgi_param-is-context-sensitive-just-lik.patch | 21 +++++++++++++++++++++
 debian/patches/series                              |  4 ++++
 6 files changed, 95 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0603795..94d3fd4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
 libcgi-formbuilder-perl (3.08-3) UNRELEASED; urgency=medium
 
+  [ Salvatore Bonaccorso ]
   * Update Vcs-Browser URL to cgit web frontend
 
+  [ Simon McVittie ]
+  * Add patches from pkgsrc, and an extra similar patch, to avoid warnings
+    about calling CGI->param in list context with recent CGI.pm
+
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 16 Aug 2014 09:30:14 +0200
 
 libcgi-formbuilder-perl (3.08-2) unstable; urgency=low
diff --git a/debian/patches/0004-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch b/debian/patches/0004-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
new file mode 100644
index 0000000..3b0b3ca
--- /dev/null
+++ b/debian/patches/0004-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
@@ -0,0 +1,22 @@
+From: Amitai Schlair <schmonz-web-ikiwiki at schmonz.com>
+Date: Thu, 16 Oct 2014 10:33:57 +0100
+Subject: Avoid unneeded warning from CGI.pm 4.05 or newer
+
+Origin: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/p5-CGI-FormBuilder/patches/patch-lib_CGI_FormBuilder.pm?rev=1.1&content-type=text/plain
+---
+ lib/CGI/FormBuilder.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/CGI/FormBuilder.pm b/lib/CGI/FormBuilder.pm
+index e8fc358..1ac861e 100644
+--- a/lib/CGI/FormBuilder.pm
++++ b/lib/CGI/FormBuilder.pm
+@@ -855,7 +855,7 @@ sub keepextras {
+ 
+     # Make sure to get all values
+     for my $p (@keep) {
+-        for my $v ($self->{params}->param($p)) {
++        for my $v (@{$self->{params}->param_fetch($p)}) {
+             debug 1, "keepextras: saving hidden param $p = $v";
+             push @html, htmltag('input', name => $p, type => 'hidden', value => $v);
+         }
diff --git a/debian/patches/0005-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch b/debian/patches/0005-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
new file mode 100644
index 0000000..81cfaa9
--- /dev/null
+++ b/debian/patches/0005-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
@@ -0,0 +1,22 @@
+From: Amitai Schlair <schmonz-web-ikiwiki at schmonz.com>
+Date: Thu, 16 Oct 2014 10:34:45 +0100
+Subject: Avoid unneeded warning from CGI.pm 4.05 or newer
+
+Origin: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/p5-CGI-FormBuilder/patches/patch-lib_CGI_FormBuilder_Field.pm?rev=1.1&content-type=text/plain
+---
+ lib/CGI/FormBuilder/Field.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/CGI/FormBuilder/Field.pm b/lib/CGI/FormBuilder/Field.pm
+index 67bbcee..fa08e25 100644
+--- a/lib/CGI/FormBuilder/Field.pm
++++ b/lib/CGI/FormBuilder/Field.pm
+@@ -189,7 +189,7 @@ sub cgi_value {
+     my $self = shift;
+     debug 2, "$self->{name}: called \$field->cgi_value";
+     puke "Cannot set \$field->cgi_value manually" if @_;
+-    if (my @v = $self->{_form}{params}->param($self->name)) {
++    if (my @v = @{$self->{_form}{params}->param_fetch($self->name)}) {
+         for my $v (@v) {
+             if ($self->other && $v eq $self->othername) {
+                 debug 1, "$self->{name}: redoing value from _other field";
diff --git a/debian/patches/0006-Fix-another-use-of-param-that-will-cause-a-warning-i.patch b/debian/patches/0006-Fix-another-use-of-param-that-will-cause-a-warning-i.patch
new file mode 100644
index 0000000..44c3533
--- /dev/null
+++ b/debian/patches/0006-Fix-another-use-of-param-that-will-cause-a-warning-i.patch
@@ -0,0 +1,21 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 16 Oct 2014 10:39:16 +0100
+Subject: Fix another use of param that will cause a warning in recent CGI.pm
+
+---
+ lib/CGI/FormBuilder/Multi.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/CGI/FormBuilder/Multi.pm b/lib/CGI/FormBuilder/Multi.pm
+index bdc9f45..215f68f 100644
+--- a/lib/CGI/FormBuilder/Multi.pm
++++ b/lib/CGI/FormBuilder/Multi.pm
+@@ -218,7 +218,7 @@ sub navbar {
+         }
+         for my $k (@{$self->{keepextras}}) {
+             next if $k eq $pnam;
+-            for my $v ($self->{params}->param($k)) {
++            for my $v (@{$self->{params}->param_fetch($k)}) {
+                 push @keep, { name => $k, value => $v };
+             }
+         }
diff --git a/debian/patches/0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch b/debian/patches/0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch
new file mode 100644
index 0000000..184affd
--- /dev/null
+++ b/debian/patches/0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch
@@ -0,0 +1,21 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 16 Oct 2014 10:40:29 +0100
+Subject: Comment that cgi_param is context-sensitive just like param
+
+---
+ lib/CGI/FormBuilder.pm | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/CGI/FormBuilder.pm b/lib/CGI/FormBuilder.pm
+index 1ac861e..ad322c3 100644
+--- a/lib/CGI/FormBuilder.pm
++++ b/lib/CGI/FormBuilder.pm
+@@ -1175,6 +1175,8 @@ sub required_tag {
+ 
+ sub cgi_param {
+     my $self = shift;
++    # This returns a scalar or a list, depending on context, like CGI.pm.
++    # For best results, don't call it with a parameter in list context.
+     $self->{params}->param(@_);
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 7636b8e..ae55f21 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
 perl5.18-hashes.patch
 pod-encoding.patch
 pod-spelling.patch
+0004-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
+0005-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
+0006-Fix-another-use-of-param-that-will-cause-a-warning-i.patch
+0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcgi-formbuilder-perl.git



More information about the Pkg-perl-cvs-commits mailing list