GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Class::WhiteHole(3) User Contributed Perl Documentation Class::WhiteHole(3)

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

  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);

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.

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.

Copyright 2000 Michael G Schwern <schwern@pobox.com> all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Michael G Schwern <schwern@pobox.com>

Class::BlackHole
2003-05-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.