Front page | perl.perl5.porters |
Postings from October 2003
From: Slaven Rezic
October 6, 2003 08:16
Message ID: email@example.com
The explicit usage/requirement of UNIVERSAL.pm seems to break things:
$ perl -Mless=time -e1
$ perl -MUNIVERSAL -Mless=time -e1
"time" is not exported by the less module
Can't continue after import errors at -e line 0
BEGIN failed--compilation aborted.
I see the following comment and code in UNIVERSAL.pm:
# 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 can't be fixed without breaking code. Note that we
# *don't* set @ISA here, don't want all classes/objects inheriting from
# Exporter. It's bad enough that all classes have a import() method
# whenever UNIVERSAL.pm is loaded.
*import = \&Exporter::import;
Can anybody remember the requirement for defining the import alias?
Can it be removed? If not, then the documentation of UNIVERSAL.pm should
be changed and it should say in big letters to not use or require
Slaven Rezic - slaven <at> rezic <dot> de
by Slaven Rezic