logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Class::WhiteHole - base class to treat unhandled method calls as errors

Author

       Michael G Schwern <schwern@pobox.com>

Bugs & Caveats

       Be sure to have Class::WhiteHole before the class from which you're inheriting AUTOLOAD in the ISA.
       Usually you'll want Class::WhiteHole to come first.

       If your class inherits autoloaded routines this class may cause them to stop working.  Choose wisely
       before using.

       White holes are only a hypothesis and may not really exist.

Description

       Its possible to accidentally inherit an AUTOLOAD method.  Often this will happen if a class somewhere in
       the chain uses AutoLoader or defines one of their own.  This can lead to confusing error messages when
       method lookups fail.

       Sometimes you want to avoid this accidental inheritance.  In that case, inherit from Class::WhiteHole.
       All unhandled methods will produce normal Perl error messages.

Name

       Class::WhiteHole - base class to treat unhandled method calls as errors

See Also

       Class::BlackHole

perl v5.36.0                                       2022-10-13                              Class::WhiteHole(3pm)

Synopsis

         package Bar;

         # DBI inherits from DynaLoader which inherits from AutoLoader
         # Bar wants to avoid this accidental inheritance of AutoLoader.
         use base qw(Class::WhiteHole DBI);

See Also