What is it that you think this is gaining ? Graham. On Thu, Apr 26, 2001 at 04:22:34PM +0530, Abhijit Menon-Sen wrote: > On 2001-04-26 04:54:17, barries@slaysys.com wrote: > > > > > There should not be an import{} method at all. > > > > Cat's out of the bag on this on, I think. Quoth perlobj: [...] > > > > use UNIVERSAL qw(isa); > > How about this, then? > > - ams > > --- perl@9818/lib/UNIVERSAL.pm~ Thu Apr 26 03:14:28 2001 > +++ perl@9818/lib/UNIVERSAL.pm Thu Apr 26 16:21:24 2001 > @@ -2,12 +2,17 @@ > > 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 > +{ > + no strict 'refs'; > + my $pkg = caller; > + > + foreach my $sym (@_) { > + if ($sym eq "isa" || $sym eq "can") { > + *{"${pkg}::$sym"} = \&$sym; > + } > + } > +} > > 1; > __END__Thread Previous | Thread Next