projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
057d076
)
override.t: Suppress deprecation warning
author
Father Chrysostomos
<sprout@cpan.org>
Tue, 4 Dec 2012 22:40:26 +0000
(14:40 -0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Tue, 4 Dec 2012 22:40:26 +0000
(14:40 -0800)
If we have overridden CORE::GLOBAL::require for the sake of testing it,
we can’t do ‘no warnings’ obviously.
t/op/override.t
patch
|
blob
|
history
diff --git
a/t/op/override.t
b/t/op/override.t
index
e62f785
..
9202957
100644
(file)
--- a/
t/op/override.t
+++ b/
t/op/override.t
@@
-63,7
+63,11
@@
is( $r, join($dirsep, "Foo", "Bar.pm") );
}
{
- no warnings 'deprecated';
+ BEGIN {
+ # Can’t do ‘no warnings’ with CORE::GLOBAL::require overridden. :-)
+ CORE::require warnings;
+ unimport warnings 'deprecated';
+ }
my $_ = 'bar.pm';
require;
is( $r, 'bar.pm' );