diff options
author | Steffen Mueller <smueller@cpan.org> | 2009-09-03 10:45:17 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2009-09-03 10:45:17 +0200 |
commit | b814bbfa9a2087bc9c1208d2ca690faeec84362a (patch) | |
tree | e6d85a850be2adc75f49585304691b387389358e /lib/Getopt | |
parent | 96471c6b3e9cad6e88559f66a5fdf6902c5e7b4a (diff) | |
download | perl-b814bbfa9a2087bc9c1208d2ca690faeec84362a.tar.gz |
Silence more deprecation warnings in compatibility tests for Getopt::Long
Diffstat (limited to 'lib/Getopt')
-rw-r--r-- | lib/Getopt/Long/t/gol-compat.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Getopt/Long/t/gol-compat.t b/lib/Getopt/Long/t/gol-compat.t index c123ef27f1..fe4f746194 100644 --- a/lib/Getopt/Long/t/gol-compat.t +++ b/lib/Getopt/Long/t/gol-compat.t @@ -9,7 +9,17 @@ BEGIN { } } -require "newgetopt.pl"; +{ + # Silence the deprecation warnings from newgetopt.pl for the purpose + # of testing. These tests will be removed along with newgetopt.pl in + # the next major release of perl. + local $SIG{__WARN__} = sub { + if ($_[0] !~ /deprecated/) { + print(STDERR @_); + } + }; + require "newgetopt.pl"; +} print "1..9\n"; |