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::C3::Componentised(3) User Contributed Perl Documentation Class::C3::Componentised(3)

Class::C3::Componentised - Load mix-ins or components to your C3-based class

  package MyModule;

  use strict;
  use warnings;

  use base 'Class::C3::Componentised';

  sub component_base_class { "MyModule::Component" }

  package main;

  MyModule->load_components( qw/Foo Bar/ );
  # Will load MyModule::Component::Foo and MyModule::Component::Bar

This will inject base classes to your module using the Class::C3 method resolution order.

Please note: these are not plugins that can take precedence over methods declared in MyModule. If you want something like that, consider MooseX::Object::Pluggable.

Loads the given components into the current module. If a module begins with a "+" character, it is taken to be a fully qualified class name, otherwise "$class->component_base_class" is prepended to it.

Calling this will call "Class::C3::reinitialize".

Similar to load_components, but assumes every class is "$class::$comp".

As load_components, but will silently ignore any components that cannot be found.

Given a class name, tests to see if it is already loaded or otherwise defined. If it is not yet loaded, the package is require'd, and an exception is thrown if the class is still not loaded.

 BUG: For some reason, packages with syntax errors are added to %INC on
      require

Returns true if the specified class is installed or already loaded, false otherwise.

Does the actual magic of adjusting @ISA on the target module.

Returns a true value if the specified class is installed and loaded successfully, throws an exception if the class is found but not loaded successfully, and false if the class is not installed

Matt S. Trout and the DBIx::Class team

Pulled out into separate module by Ash Berlin "<ash@cpan.org>"

Optimizations and overall bolt-tightening by Peter "ribasushi" Rabbitson "<ribasushi@cpan.org>"

Copyright (c) 2006 - 2011 the Class::C3::Componentised "AUTHORS" as listed above.

You may distribute this code under the same terms as Perl itself.
2018-02-23 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.