diff options
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"; |