[libpackage-stash-perl] 02/03: Add a patch fixing a warning in taint mode. (Closes: #762334)

Niko Tyni ntyni at moszumanska.debian.org
Sun Sep 21 12:47:18 UTC 2014


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

ntyni pushed a commit to branch master
in repository libpackage-stash-perl.

commit df39a48caec6a44846b97a35af341163b9cd6489
Author: Niko Tyni <ntyni at debian.org>
Date:   Sun Sep 21 15:29:41 2014 +0300

    Add a patch fixing a warning in taint mode. (Closes: #762334)
---
 ...1-Fix-a-spurious-warning-under-taint-mode.patch | 68 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 69 insertions(+)

diff --git a/debian/patches/0001-Fix-a-spurious-warning-under-taint-mode.patch b/debian/patches/0001-Fix-a-spurious-warning-under-taint-mode.patch
new file mode 100644
index 0000000..9f52d51
--- /dev/null
+++ b/debian/patches/0001-Fix-a-spurious-warning-under-taint-mode.patch
@@ -0,0 +1,68 @@
+From 20e0ba5f52e7c7424810dd25d98a292f4e3f19fe Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sun, 21 Sep 2014 11:58:51 +0300
+Subject: [PATCH] Fix a spurious warning under taint mode
+
+Bug-Debian: https://bugs.debian.org/762334
+Forwarded: https://github.com/doy/package-stash/pull/12
+---
+ MANIFEST                |  1 +
+ lib/Package/Stash/PP.pm |  1 +
+ t/warnings-taint.t      | 21 +++++++++++++++++++++
+ 3 files changed, 23 insertions(+)
+ create mode 100644 t/warnings-taint.t
+
+diff --git a/MANIFEST b/MANIFEST
+index 5b4331d..ea9879c 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -37,6 +37,7 @@ t/paamayim_nekdotayim.t
+ t/scalar-values.t
+ t/stash-deletion.t
+ t/synopsis.t
++t/warnings-taint.t
+ t/warnings.t
+ xt/author/leaks-debug.t
+ xt/author/leaks.t
+diff --git a/lib/Package/Stash/PP.pm b/lib/Package/Stash/PP.pm
+index 1aa128d..daaf19f 100644
+--- a/lib/Package/Stash/PP.pm
++++ b/lib/Package/Stash/PP.pm
+@@ -190,6 +190,7 @@ sub add_symbol {
+             local *__ANON__:: = $namespace;
+             no strict 'refs';
+             no warnings 'void';
++            no warnings 'once';
+             *{"__ANON__::$name"};
+         }
+ 
+diff --git a/t/warnings-taint.t b/t/warnings-taint.t
+new file mode 100644
+index 0000000..0fc9758
+--- /dev/null
++++ b/t/warnings-taint.t
+@@ -0,0 +1,21 @@
++#!/usr/bin/env perl -T
++use strict;
++use warnings;
++use Test::More;
++
++use Package::Stash;
++
++my $warnings;
++BEGIN {
++    $warnings = '';
++    $SIG{__WARN__} = sub { $warnings .= $_[0] };
++}
++
++BEGIN {
++    my $stash = Package::Stash->new('Foo');
++    $stash->get_or_add_symbol('$bar');
++}
++
++is($warnings, '');
++
++done_testing;
+-- 
+2.1.0
+
diff --git a/debian/patches/series b/debian/patches/series
index c35fd3f..99e992d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 rm-package-stash-conflicts.patch
+0001-Fix-a-spurious-warning-under-taint-mode.patch

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



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