diff options
author | Niko Tyni <ntyni@debian.org> | 2014-09-21 11:58:51 +0300 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-09-21 12:59:18 -0400 |
commit | 75c2df38ef4dd32445753354846356f8a058c298 (patch) | |
tree | def8bef87e182c7d550ea7c66668dc2843d6ba8e /t/warnings-taint.t | |
parent | 8d4e0e9504ebdf7f656c43873674c3e6d1419c44 (diff) | |
download | package-stash-75c2df38ef4dd32445753354846356f8a058c298.tar.gz package-stash-75c2df38ef4dd32445753354846356f8a058c298.zip |
Fix a spurious warning under taint mode
Bug-Debian: https://bugs.debian.org/762334
Diffstat (limited to 't/warnings-taint.t')
-rw-r--r-- | t/warnings-taint.t | 21 |
1 files changed, 21 insertions, 0 deletions
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; |