1Class::MOP::Method::ConUssterrucCtoonrt(r3i)buted Perl DColcausmse:n:tMaOtPi:o:nMethod::Constructor(3)
2
3
4
6 Class::MOP::Method::Constructor - Method Meta Object for constructors
7
9 use Class::MOP::Method::Constructor;
10
11 my $constructor = Class::MOP::Method::Constructor->new(
12 metaclass => $metaclass,
13 options => {
14 debug => 1, # this is all for now
15 },
16 );
17
18 # calling the constructor ...
19 $constructor->body->execute($metaclass->name, %params);
20
22 This is a subclass of "Class::MOP::Method" which generates constructor
23 methods.
24
26 Class::MOP::Method::Constructor->new(%options)
27 This creates a new constructor object. It accepts a hash reference
28 of options.
29
30 · metaclass
31
32 This should be a Class::MOP::Class object. It is required.
33
34 · name
35
36 The method name (without a package name). This is required.
37
38 · package_name
39
40 The package name for the method. This is required.
41
42 · is_inline
43
44 This indicates whether or not the constructor should be
45 inlined. This defaults to false.
46
47 $metamethod->is_inline
48 Returns a boolean indicating whether or not the constructor is
49 inlined.
50
51 $metamethod->associated_metaclass
52 This returns the Class::MOP::Class object for the method.
53
55 Stevan Little <stevan@iinteractive.com>
56
58 Copyright 2006-2010 by Infinity Interactive, Inc.
59
60 <http://www.iinteractive.com>
61
62 This library is free software; you can redistribute it and/or modify it
63 under the same terms as Perl itself.
64
65
66
67perl v5.12.2 2010-09-13Class::MOP::Method::Constructor(3)