2 package Class::MOP::Method::Generated;
10 our $AUTHORITY = 'cpan:STEVAN';
12 use base 'Class::MOP::Method';
18 ($options{package_name} && $options{name})
19 || confess "You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT";
24 '$!package_name' => $options{package_name},
25 '$!name' => $options{name},
26 # specific to this subclass
27 '$!is_inline' => ($options{is_inline} || 0),
30 $self->initialize_body;
37 sub is_inline { (shift)->{'$!is_inline'} }
40 confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class";
53 Class::MOP::Method::Generated - Abstract base class for generated methods
57 This is a C<Class::MOP::Method> subclass which is used interally
58 by C<Class::MOP::Method::Accessor> and C<Class::MOP::Method::Constructor>.
64 =item B<new (%options)>
66 This creates the method based on the criteria in C<%options>,
73 This is a boolean to indicate if the method should be generated
74 as a closure, or as a more optimized inline version.
80 This returns the boolean which was passed into C<new>.
82 =item B<initialize_body>
84 This is an abstract method and will throw an exception if called.
90 Stevan Little E<lt>stevan@iinteractive.comE<gt>
92 =head1 COPYRIGHT AND LICENSE
94 Copyright 2006-2008 by Infinity Interactive, Inc.
96 L<http://www.iinteractive.com>
98 This library is free software; you can redistribute it and/or modify
99 it under the same terms as Perl itself.