diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-02-07 15:31:49 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-02-07 15:32:56 +0100 |
commit | cd477a63b79827394e51e6698e1a59ee11fa4eeb (patch) | |
tree | cfac8a70180a2ff4b718681e1c584744932be421 /t | |
parent | 1d9f57de1578571277e83372972a28d6d830e713 (diff) | |
download | perl-cd477a63b79827394e51e6698e1a59ee11fa4eeb.tar.gz |
Add test for previous patch (deprecation of UNIVERSAL->import)
Diffstat (limited to 't')
-rwxr-xr-x | t/op/universal.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/universal.t b/t/op/universal.t index f1c0323c67..a1ff975c70 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -10,7 +10,7 @@ BEGIN { require "./test.pl"; } -plan tests => 116; +plan tests => 117; $a = {}; bless $a, "Bob"; @@ -245,3 +245,11 @@ ok (!splatt->isa('plop')); ok (!splatt->isa('zlopp')); ok (splatt->isa('plop')); +use warnings "deprecated"; +{ + my $m; + local $SIG{__WARN__} = sub { $m = $_[0] }; + eval "use UNIVERSAL"; + like($m, qr/^UNIVERSAL->import is deprecated/, + "deprecation warning for UNIVERSAL->import"); +} |