This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96471c6
)
Silence more deprecation warnings in compatibility tests for Getopt::Long
author
Steffen Mueller
<smueller@cpan.org>
Thu, 3 Sep 2009 08:45:17 +0000
(10:45 +0200)
committer
Steffen Mueller
<smueller@cpan.org>
Thu, 3 Sep 2009 08:45:17 +0000
(10:45 +0200)
lib/Getopt/Long/t/gol-compat.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Getopt/Long/t/gol-compat.t
b/lib/Getopt/Long/t/gol-compat.t
index
c123ef2
..
fe4f746
100644
(file)
--- 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";