Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::c3::componentised::applyhooks5.18(3) [mojave man page]

Class::C3::Componentised::ApplyHooks(3) 		User Contributed Perl Documentation		   Class::C3::Componentised::ApplyHooks(3)

NAME
Class::C3::Componentised::ApplyHooks SYNOPSIS
package MyComponent; our %statistics; use Class::C3::Componentised::ApplyHooks -before_apply => sub { my ($class, $component) = @_; push @{$statistics{$class}}, '-before_apply'; }, -after_apply => sub { my ($class, $component) = @_; push @{$statistics{$class}}, '-after_apply'; }, qw(BEFORE_APPLY AFTER_APPLY); BEFORE_APPLY { push @{$statistics{$class}}, 'BEFORE_APPLY' }; AFTER_APPLY { push @{$statistics{$class}}, 'AFTER_APPLY' }; AFTER_APPLY { use Devel::Dwarn; Dwarn %statistics }; 1; DESCRIPTION
This package allows a given component to run methods on the class that is being injected into before or after the component is injected. Note from the "SYNOPSIS" that all "Load Actions" may be run more than once. IMPORT ACTION
Both import actions simply run a list of coderefs that will be passed the class that is being acted upon and the component that is being added to the class. IMPORT OPTIONS
-before_apply Adds a before apply action for the current component without importing any subroutines into your namespace. -after_apply Adds an after apply action for the current component without importing any subroutines into your namespace. EXPORTED SUBROUTINES
BEFORE_APPLY BEFORE_APPLY { warn "about to apply $_[1] to class $_[0]" }; Adds a before apply action for the current component. AFTER_APPLY AFTER_APPLY { warn "just applied $_[1] to class $_[0]" }; Adds an after apply action for the current component. perl v5.18.2 2011-08-08 Class::C3::Componentised::ApplyHooks(3)

Check Out this Related Man Page

ExtUtils::XSpp::Node::Class(3pm)			User Contributed Perl Documentation			  ExtUtils::XSpp::Node::Class(3pm)

NAME
ExtUtils::XSpp::Node::Class - A class (inherits from Package). DESCRIPTION
An ExtUtils::XSpp::Node::Package sub-class representing a class declaration such as %name{PerlClassName} class MyClass : public BaseClass { ... } The Perl-level class name and the C++ class name attributes are inherited from the ExtUtils::XSpp::Node::Package class. METHODS
new Creates a new "ExtUtils::XSpp::Node::Class" object. Optional named parameters: "methods" can be a reference to an array of methods (ExtUtils::XSpp::Node::Method) of the class, and "base_classes", a reference to an array of base classes ("ExtUtils::XSpp::Node::Class" objects). "catch" may be a list of exception names that all methods in the class handle. add_methods Adds new methods to the class. By default, their scope is "public". Takes arbitrary number of arguments which are processed in order. If an argument is an ExtUtils::XSpp::Node::Access, the current method scope is changed accordingly for all following methods. If an argument is an ExtUtils::XSpp::Node::Method it is added to the list of methods of the class. The method's class name is set to the current class and its scope is set to the current method scope. ACCESSORS
methods Returns the internal reference to the array of methods in this class. Each of the methods is an "ExtUtils::XSpp::Node::Method" base_classes Returns the internal reference to the array of base classes of this class. If the base classes have been defined in the same file, these are the complete class objects including method definitions, otherwise only the C++ and Perl name of the class are available as attributes. perl v5.14.2 2011-12-20 ExtUtils::XSpp::Node::Class(3pm)
Man Page