summaryrefslogtreecommitdiff
path: root/lib/UNIVERSAL.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-02-07 15:00:33 +0000
committerNicholas Clark <nick@ccl4.org>2009-02-07 15:00:33 +0000
commitb3f1e0ca82d294b0623e703c44104244c31cb9ef (patch)
tree144c2b61f21a16ec50f5305323f190d00b931640 /lib/UNIVERSAL.pm
parent9b6474b65b5960c01431344dff68b19ec547ad06 (diff)
downloadperl-b3f1e0ca82d294b0623e703c44104244c31cb9ef.tar.gz
require warnings; as late as possible, to avoid a new side effect of
use UNIVERSAL;
Diffstat (limited to 'lib/UNIVERSAL.pm')
-rw-r--r--lib/UNIVERSAL.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/UNIVERSAL.pm b/lib/UNIVERSAL.pm
index 01a16ca920..d0aa1ede18 100644
--- a/lib/UNIVERSAL.pm
+++ b/lib/UNIVERSAL.pm
@@ -11,12 +11,11 @@ our $VERSION = '1.04';
require Exporter;
@EXPORT_OK = qw(isa can VERSION);
-require warnings;
-
# Make sure that even though the import method is called, it doesn't do
# anything unless called on UNIVERSAL.
sub import {
return unless $_[0] eq __PACKAGE__;
+ require warnings;
warnings::warnif(
'deprecated',
'UNIVERSAL->import is deprecated and will be removed in a future perl',