On Fri, Jul 07, 2000 at 09:58:40AM -0400, Kurt Starsinic wrote:
> On Fri, Jul 07, 2000 at 04:26:39AM -0400, Michael G Schwern wrote:
> > Name                    DSLI    Description                     Info
> > --------------------    ----    -----------------------------   --------
> > Class::WhiteHole        adpO    Blocks autoloader inheritance   MSCHWERN
> > 
> > 
> > So, this module might be a little silly, but I had a need.  This does
> > the reverse of Class::BlackHole, all unhandled methods become normal
> > errors as if no autoloader existed.  Useful if you've accidentally
> > inherited an autoloader and its making your class's error messages
> > look funny.  Class::DBI and Ima::DBI have such a problem.
> 
>     The module isn't silly at all, but the name isn't too expressive.
> Maybe something like Class::NoAutoInherit or something?

Even that name is ambigious as it implies (to me) no automatic inheritance,
which I know sounds silly. Maybe Class::NoAutoLoader;

I have not looked at the code, but I assume it works by Class::WhiteHole 
defining an AUTOLOAD sub which just dies. If so then I would consider a
patch to AutoLoader.pm which allows

  no AutoLoader;

It would just need to do somethig like

sub unimport {
  my $caller = caller;
  *{"$caller\::AUTOLOAD} = \&noAUTOLOAD;
}

Where noAUTOLOAD is defined in AutoLoader.pm


Graham.

Reply via email to