stop Math/BigInt/t/bare_mbf.t producing spurious test output
[p5sagit/p5-mst-13.2.git] / lib / UNIVERSAL.pm
index 7b7bfc4..8808271 100644 (file)
@@ -1,6 +1,6 @@
 package UNIVERSAL;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 # UNIVERSAL should not contain any extra subs/methods beyond those
 # that it exists to define. The use of Exporter below is a historical
@@ -9,9 +9,15 @@ our $VERSION = '1.01';
 # Exporter.  It's bad enough that all classes have a import() method
 # whenever UNIVERSAL.pm is loaded.
 require Exporter;
-*import = \&Exporter::import;
 @EXPORT_OK = qw(isa can VERSION);
 
+# Make sure that even though the import method is called, it doesn't do
+# anything unless its called on UNIVERSAL
+sub import {
+    return unless $_[0] eq __PACKAGE__;
+    goto &Exporter::import;
+}
+
 1;
 __END__