From: Nicholas Clark Date: Sat, 7 Feb 2009 15:00:33 +0000 (+0000) Subject: require warnings; as late as possible, to avoid a new side effect of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3f1e0ca82d294b0623e703c44104244c31cb9ef;p=p5sagit%2Fp5-mst-13.2.git require warnings; as late as possible, to avoid a new side effect of use UNIVERSAL; --- diff --git a/lib/UNIVERSAL.pm b/lib/UNIVERSAL.pm index 01a16ca..d0aa1ed 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',