Class::MOP::Method::Constructor - Method Meta Object for constructors
use Class::MOP::Method::Constructor; my $constructor = Class::MOP::Method::Constructor->new( metaclass => $metaclass, options => { debug => 1, # this is all for now }, ); # calling the constructor ... $constructor->body->($metaclass->name, %params);
This is a subclass of Class::MOP::Method which deals with class constructors. This is used when making a class immutable to generate an optimized constructor.
Class::MOP::Method
This returns the options HASH which is passed into new.
new
This returns the metaclass which is passed into new.
This returns the list of attributes which are associated with the metaclass which is passed into new.
This returns the meta instance which is associated with the metaclass which is passed into new.
This returns a boolean, but since constructors are very rarely not inlined, this always returns true for now.
This creates the code reference for the constructor itself.
Stevan Little <stevan@iinteractive.com>
Copyright 2006-2008 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::MOP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::MOP
CPAN shell
perl -MCPAN -e shell install Class::MOP
For more information on module installation, please visit the detailed CPAN module installation guide.