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

[PATCH] UNIVERSAL shouldn't require Exporter

Thread Next
Abhijit Menon-Sen
April 25, 2001 15:22
[PATCH] UNIVERSAL shouldn't require Exporter
Message ID:
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/	Thu Apr 26 03:14:28 2001
+++ perl@9818/lib/	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 { }

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About