Ronald J Kimball <[EMAIL PROTECTED]> said something to this effect on
01/29/2002:
> On Tue, Jan 29, 2002 at 02:55:37PM -0500, Ron Newman wrote:
> > The following program does not cause an error, even though
> > my package neither defines a function called import(), nor
> > inherits from any other package:
> >
> > #!/usr/bin/perl -w
> > use strict;
> >
> > package This;
> > This->import();
> >
> > My question: What function is it calling, and where did it
> > find that function? Is there a UNIVERSAL::import() which
> > does nothing?
> >
>
> It turns out that import() gets a bit of special treatment; if
> the method doesn't exist, the error is ignored.
Yes, plus:
package UNIVERSAL;
# 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);
1;
__END__
perldoc -t UNIVERSAL told me this.
(darren)
--
God is love, but get it in writing.
-- Gypsy Rose Lee