develooper Front page | perl.perl5.porters | Postings from April 2001

[PATCH] UNIVERSAL shouldn't require Exporter

Thread Next
From:
Abhijit Menon-Sen
Date:
April 25, 2001 15:22
Subject:
[PATCH] UNIVERSAL shouldn't require Exporter
Message ID:
20010426035147.A23675@lustre.linux.in
Historical accident fixed, in the hope that someone will tell me what
I'm missing. Was it merely an oversight that this wasn't fixed earlier,
or does somebody rely on the Exporter behaviour?

"These subroutines should NOT be imported via use UNIVERSAL qw(...)",
but would a patch which allowed this anyway (as Exporter does) be a
better idea? Or do we need an import at all?

- ams

--- perl@9818/lib/UNIVERSAL.pm~	Thu Apr 26 03:14:28 2001
+++ perl@9818/lib/UNIVERSAL.pm	Thu Apr 26 03:30:44 2001
@@ -2,12 +2,7 @@
 
 our $VERSION = '1.00';
 
-# UNIVERSAL should not contain any extra subs/methods beyond those
-# that it exists to define. The use of Exporter below is a historical
-# accident that should be fixed sometime.
-require Exporter;
-*import = \&Exporter::import;
-@EXPORT_OK = qw(isa can);
+sub import { }
 
 1;
 __END__

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About