From cd477a63b79827394e51e6698e1a59ee11fa4eeb Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sat, 7 Feb 2009 15:31:49 +0100 Subject: Add test for previous patch (deprecation of UNIVERSAL->import) --- t/op/universal.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't') 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"); +} -- cgit v1.2.1