On Thu, Apr 26, 2001 at 02:37:12PM +0100, Simon Cozens wrote: > On Thu, Apr 26, 2001 at 01:58:34PM +0100, Mike Guy wrote: > > These subroutines should not be imported via > > "use UNIVERSAL qw(...)". > > What was the rationale for this statement? Action at a distance. If you have a module which does not have or inherit import (eg SelectSaver) use SelectSaver qw(foobar); silently ignores the qw(foobar) use UNIVERSAL; use SelectSaver qw(foobar); dies, because every module now inherits Exporter. Also the nature of UNIVERSAL is to supply default methods for all classes, not export things. In fact this should be fixed with something like sub import { return unless $_[0] eq 'UNIVERSAL'; require Exporter; goto &Exporter::import } Graham.Thread Previous | Thread Next