2 package Moose::Meta::Role;
8 use Scalar::Util 'blessed';
10 use Sub::Name 'subname';
11 use Devel::GlobalDestruction 'in_global_destruction';
13 our $VERSION = '0.79';
14 $VERSION = eval $VERSION;
15 our $AUTHORITY = 'cpan:STEVAN';
17 use Moose::Meta::Class;
18 use Moose::Meta::Role::Method;
19 use Moose::Meta::Role::Method::Required;
21 use base 'Class::MOP::Module';
23 ## ------------------------------------------------------------------
25 ## I normally don't do this, but I am doing
26 ## a whole bunch of meta-programmin in this
27 ## module, so it just makes sense. For a clearer
28 ## picture of what is going on in the next
29 ## several lines of code, look at the really
30 ## big comment at the end of this file (right
33 ## ------------------------------------------------------------------
35 my $META = __PACKAGE__->meta;
37 ## ------------------------------------------------------------------
41 # since roles are lazy, we hold all the attributes
42 # of the individual role in 'statis' until which
43 # time when it is applied to a class. This means
44 # keeping a lot of things in hash maps, so we are
45 # using a little of that meta-programmin' magic
46 # here an saving lots of extra typin. And since
47 # many of these attributes above require similar
48 # functionality to support them, so we again use
49 # the wonders of meta-programmin' to deliver a
50 # very compact solution to this normally verbose
56 name => 'excluded_roles_map',
57 attr_reader => 'get_excluded_roles_map' ,
59 add => 'add_excluded_roles',
60 get_list => 'get_excluded_roles_list',
61 existence => 'excludes_role',
65 name => 'required_methods',
66 attr_reader => 'get_required_methods_map',
68 add => 'add_required_methods',
69 remove => 'remove_required_methods',
70 get_list => 'get_required_method_list',
71 existence => 'requires_method',
75 name => 'attribute_map',
76 attr_reader => 'get_attribute_map',
78 get => 'get_attribute',
79 get_list => 'get_attribute_list',
80 existence => 'has_attribute',
81 remove => 'remove_attribute',
86 my $attr_reader = $action->{attr_reader};
87 my $methods = $action->{methods};
89 # create the attribute
90 $META->add_attribute($action->{name} => (
91 reader => $attr_reader,
95 # create some helper methods
96 $META->add_method($methods->{add} => sub {
97 my ($self, @values) = @_;
98 $self->$attr_reader->{$_} = undef foreach @values;
99 }) if exists $methods->{add};
101 $META->add_method($methods->{get_list} => sub {
103 keys %{$self->$attr_reader};
104 }) if exists $methods->{get_list};
106 $META->add_method($methods->{get} => sub {
107 my ($self, $name) = @_;
108 $self->$attr_reader->{$name}
109 }) if exists $methods->{get};
111 $META->add_method($methods->{existence} => sub {
112 my ($self, $name) = @_;
113 exists $self->$attr_reader->{$name} ? 1 : 0;
114 }) if exists $methods->{existence};
116 $META->add_method($methods->{remove} => sub {
117 my ($self, @values) = @_;
118 delete $self->$attr_reader->{$_} foreach @values;
119 }) if exists $methods->{remove};
122 $META->add_attribute(
124 reader => 'method_metaclass',
125 default => 'Moose::Meta::Role::Method',
128 $META->add_attribute(
129 'required_method_metaclass',
130 reader => 'required_method_metaclass',
131 default => 'Moose::Meta::Role::Method::Required',
134 ## some things don't always fit, so they go here ...
139 unless ( defined $name && $name ) {
141 Moose->throw_error("You must provide a name for the attribute");
144 if (scalar @_ == 1 && ref($_[0]) eq 'HASH') {
150 $self->get_attribute_map->{$name} = $attr_desc;
153 ## ------------------------------------------------------------------
157 # the before/around/after method modifiers are
158 # stored by name, but there can be many methods
159 # then associated with that name. So again we have
160 # lots of similar functionality, so we can do some
161 # meta-programmin' and save some time.
164 foreach my $modifier_type (qw[ before around after ]) {
166 my $attr_reader = "get_${modifier_type}_method_modifiers_map";
168 # create the attribute ...
169 $META->add_attribute("${modifier_type}_method_modifiers" => (
170 reader => $attr_reader,
171 default => sub { {} }
174 # and some helper methods ...
175 $META->add_method("get_${modifier_type}_method_modifiers" => sub {
176 my ($self, $method_name) = @_;
177 #return () unless exists $self->$attr_reader->{$method_name};
178 @{$self->$attr_reader->{$method_name}};
181 $META->add_method("has_${modifier_type}_method_modifiers" => sub {
182 my ($self, $method_name) = @_;
184 # for now we assume that if it exists,..
185 # it has at least one modifier in it
186 (exists $self->$attr_reader->{$method_name}) ? 1 : 0;
189 $META->add_method("add_${modifier_type}_method_modifier" => sub {
190 my ($self, $method_name, $method) = @_;
192 $self->$attr_reader->{$method_name} = []
193 unless exists $self->$attr_reader->{$method_name};
195 my $modifiers = $self->$attr_reader->{$method_name};
198 # check to see that we aren't adding the
199 # same code twice. We err in favor of the
200 # first on here, this may not be as expected
201 foreach my $modifier (@{$modifiers}) {
202 return if $modifier == $method;
205 push @{$modifiers} => $method;
210 ## ------------------------------------------------------------------
211 ## override method mofidiers
213 $META->add_attribute('override_method_modifiers' => (
214 reader => 'get_override_method_modifiers_map',
215 default => sub { {} }
219 # these are a little different because there
220 # can only be one per name, whereas the other
221 # method modifiers can have multiples.
224 sub add_override_method_modifier {
225 my ($self, $method_name, $method) = @_;
226 (!$self->has_method($method_name))
227 || Moose->throw_error("Cannot add an override of method '$method_name' " .
228 "because there is a local version of '$method_name'");
229 $self->get_override_method_modifiers_map->{$method_name} = $method;
232 sub has_override_method_modifier {
233 my ($self, $method_name) = @_;
235 # for now we assume that if it exists,..
236 # it has at least one modifier in it
237 (exists $self->get_override_method_modifiers_map->{$method_name}) ? 1 : 0;
240 sub get_override_method_modifier {
241 my ($self, $method_name) = @_;
242 $self->get_override_method_modifiers_map->{$method_name};
245 ## general list accessor ...
247 sub get_method_modifier_list {
248 my ($self, $modifier_type) = @_;
249 my $accessor = "get_${modifier_type}_method_modifiers_map";
250 keys %{$self->$accessor};
253 sub reset_package_cache_flag { (shift)->{'_package_cache_flag'} = undef }
254 sub update_package_cache_flag {
256 $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name);
261 ## ------------------------------------------------------------------
264 $META->add_attribute('roles' => (
265 reader => 'get_roles',
266 default => sub { [] }
270 my ($self, $role) = @_;
271 (blessed($role) && $role->isa('Moose::Meta::Role'))
272 || Moose->throw_error("Roles must be instances of Moose::Meta::Role");
273 push @{$self->get_roles} => $role;
274 $self->reset_package_cache_flag;
277 sub calculate_all_roles {
283 $_->calculate_all_roles
284 } @{ $self->get_roles });
288 my ($self, $role_name) = @_;
290 || Moose->throw_error("You must supply a role name to look for");
291 # if we are it,.. then return true
292 return 1 if $role_name eq $self->name;
293 # otherwise.. check our children
294 foreach my $role (@{$self->get_roles}) {
295 return 1 if $role->does_role($role_name);
300 ## ------------------------------------------------------------------
306 my $current = Class::MOP::check_package_cache_flag($self->name);
308 if (defined $self->{'_package_cache_flag'} && $self->{'_package_cache_flag'} == $current) {
309 return $self->{'methods'} ||= {};
312 $self->{_package_cache_flag} = $current;
314 my $map = $self->{'methods'} ||= {};
316 my $role_name = $self->name;
317 my $method_metaclass = $self->method_metaclass;
319 my $all_code = $self->get_all_package_symbols('CODE');
321 foreach my $symbol (keys %{ $all_code }) {
322 my $code = $all_code->{$symbol};
324 next if exists $map->{$symbol} &&
325 defined $map->{$symbol} &&
326 $map->{$symbol}->body == $code;
328 my ($pkg, $name) = Class::MOP::get_code_info($code);
329 my $meta = Class::MOP::class_of($pkg);
331 if ($meta && $meta->isa('Moose::Meta::Role')) {
332 my $role = $meta->name;
333 next unless $self->does_role($role);
337 # in 5.10 constant.pm the constants show up
338 # as being in the right package, but in pre-5.10
339 # they show up as constant::__ANON__ so we
340 # make an exception here to be sure that things
341 # work as expected in both.
343 unless ($pkg eq 'constant' && $name eq '__ANON__') {
344 next if ($pkg || '') ne $role_name ||
345 (($name || '') ne '__ANON__' && ($pkg || '') ne $role_name);
349 $map->{$symbol} = $method_metaclass->wrap(
351 package_name => $role_name,
360 my ($self, $name) = @_;
361 $self->get_method_map->{$name};
365 my ($self, $name) = @_;
366 exists $self->get_method_map->{$name} ? 1 : 0
369 # FIXME this is copy-pasted from Class::MOP::Class
370 # refactor to inherit from some common base
371 sub wrap_method_body {
372 my ( $self, %args ) = @_;
374 ('CODE' eq ref $args{body})
375 || Moose->throw_error("Your code block must be a CODE reference");
377 $self->method_metaclass->wrap(
378 package_name => $self->name,
384 my ($self, $method_name, $method) = @_;
385 (defined $method_name && $method_name)
386 || Moose->throw_error("You must define a method name");
389 if (blessed($method)) {
390 $body = $method->body;
391 if ($method->package_name ne $self->name) {
392 $method = $method->clone(
393 package_name => $self->name,
395 ) if $method->can('clone');
400 $method = $self->wrap_method_body( body => $body, name => $method_name );
403 $method->attach_to_class($self);
405 $self->get_method_map->{$method_name} = $method;
407 my $full_method_name = ($self->name . '::' . $method_name);
408 $self->add_package_symbol(
409 { sigil => '&', type => 'CODE', name => $method_name },
410 subname($full_method_name => $body)
413 $self->update_package_cache_flag; # still valid, since we just added the method to the map, and if it was invalid before that then get_method_map updated it
416 sub find_method_by_name { (shift)->get_method(@_) }
418 sub get_method_list {
420 grep { !/^meta$/ } keys %{$self->get_method_map};
424 Carp::cluck("The alias_method method is deprecated. Use add_method instead.\n");
428 $self->add_method(@_);
431 ## ------------------------------------------------------------------
433 ## ------------------------------------------------------------------
436 my ($self, $other, @args) = @_;
439 || Moose->throw_error("You must pass in an blessed instance");
441 if ($other->isa('Moose::Meta::Role')) {
442 require Moose::Meta::Role::Application::ToRole;
443 return Moose::Meta::Role::Application::ToRole->new(@args)->apply($self, $other);
445 elsif ($other->isa('Moose::Meta::Class')) {
446 require Moose::Meta::Role::Application::ToClass;
447 return Moose::Meta::Role::Application::ToClass->new(@args)->apply($self, $other);
450 require Moose::Meta::Role::Application::ToInstance;
451 return Moose::Meta::Role::Application::ToInstance->new(@args)->apply($self, $other);
456 my ($class, @role_specs) = @_;
458 require Moose::Meta::Role::Application::RoleSummation;
459 require Moose::Meta::Role::Composite;
461 my (@roles, %role_params);
462 while (@role_specs) {
463 my ($role_name, $params) = @{ splice @role_specs, 0, 1 };
464 my $requested_role = Class::MOP::class_of($role_name);
466 my $actual_role = $requested_role->_role_for_combination($params);
467 push @roles => $actual_role;
469 next unless defined $params;
470 $role_params{$actual_role->name} = $params;
473 my $c = Moose::Meta::Role::Composite->new(roles => \@roles);
474 Moose::Meta::Role::Application::RoleSummation->new(
475 role_params => \%role_params
481 sub _role_for_combination {
482 my ($self, $params) = @_;
487 my ( $role, $package_name, %options ) = @_;
489 $options{package} = $package_name;
491 (ref $options{attributes} eq 'HASH')
492 || confess "You must pass a HASH ref of attributes"
493 if exists $options{attributes};
495 (ref $options{methods} eq 'HASH')
496 || confess "You must pass a HASH ref of methods"
497 if exists $options{methods};
499 my (%initialize_options) = %options;
500 delete @initialize_options{qw(
508 my $meta = $role->initialize( $package_name => %initialize_options );
510 $meta->_instantiate_module( $options{version}, $options{authority} );
513 $meta->add_method('meta' => sub {
514 $role->initialize(ref($_[0]) || $_[0]);
517 if (exists $options{attributes}) {
518 foreach my $attribute_name (keys %{$options{attributes}}) {
519 my $attr = $options{attributes}->{$attribute_name};
520 $meta->add_attribute($attribute_name => $attr);
524 if (exists $options{methods}) {
525 foreach my $method_name (keys %{$options{methods}}) {
526 $meta->add_method($method_name, $options{methods}->{$method_name});
530 Class::MOP::weaken_metaclass($meta->name)
531 if $meta->is_anon_role;
536 # anonymous roles. most of it is copied straight out of Class::MOP::Class.
537 # an intrepid hacker might find great riches if he unifies this code with that
538 # code in Class::MOP::Module or Class::MOP::Package
541 # this should be sufficient, if you have a
542 # use case where it is not, write a test and
544 my $ANON_ROLE_SERIAL = 0;
547 # we need a sufficiently annoying prefix
548 # this should suffice for now, this is
549 # used in a couple of places below, so
550 # need to put it up here for now.
551 my $ANON_ROLE_PREFIX = 'Moose::Meta::Role::__ANON__::SERIAL::';
555 no warnings 'uninitialized';
556 $self->name =~ /^$ANON_ROLE_PREFIX/;
559 sub create_anon_role {
560 my ($role, %options) = @_;
561 my $package_name = $ANON_ROLE_PREFIX . ++$ANON_ROLE_SERIAL;
562 return $role->create($package_name, %options);
566 # this will only get called for
567 # anon-roles, all other calls
568 # are assumed to occur during
569 # global destruction and so don't
570 # really need to be handled explicitly
574 return if in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated
576 no warnings 'uninitialized';
577 return unless $self->name =~ /^$ANON_ROLE_PREFIX/;
579 # XXX: is this necessary for us? I don't understand what it's doing
582 # Moose does a weird thing where it replaces the metaclass for
583 # class when fixing metaclass incompatibility. In that case,
584 # we don't want to clean out the namespace now. We can detect
585 # that because Moose will explicitly update the singleton
586 # cache in Class::MOP.
587 #my $current_meta = Class::MOP::get_metaclass_by_name($self->name);
588 #return if $current_meta ne $self;
590 my ($serial_id) = ($self->name =~ /^$ANON_ROLE_PREFIX(\d+)/);
592 foreach my $key (keys %{$ANON_ROLE_PREFIX . $serial_id}) {
593 delete ${$ANON_ROLE_PREFIX . $serial_id}{$key};
595 delete ${'main::' . $ANON_ROLE_PREFIX}{$serial_id . '::'};
599 #####################################################################
601 ## This is Moose::Meta::Role as defined by Moose (plus the use of
602 ## MooseX::AttributeHelpers module). It is here as a reference to
603 ## make it easier to see what is happening above with all the meta
605 #####################################################################
608 # metaclass => 'Collection::Array',
609 # reader => 'get_roles',
610 # isa => 'ArrayRef[Moose::Meta::Roles]',
611 # default => sub { [] },
613 # 'push' => 'add_role',
617 # has 'excluded_roles_map' => (
618 # metaclass => 'Collection::Hash',
619 # reader => 'get_excluded_roles_map',
620 # isa => 'HashRef[Str]',
622 # # Not exactly set, cause it sets multiple
623 # 'set' => 'add_excluded_roles',
624 # 'keys' => 'get_excluded_roles_list',
625 # 'exists' => 'excludes_role',
629 # has 'attribute_map' => (
630 # metaclass => 'Collection::Hash',
631 # reader => 'get_attribute_map',
632 # isa => 'HashRef[Str]',
634 # # 'set' => 'add_attribute' # has some special crap in it
635 # 'get' => 'get_attribute',
636 # 'keys' => 'get_attribute_list',
637 # 'exists' => 'has_attribute',
638 # # Not exactly delete, cause it sets multiple
639 # 'delete' => 'remove_attribute',
643 # has 'required_methods' => (
644 # metaclass => 'Collection::Hash',
645 # reader => 'get_required_methods_map',
646 # isa => 'HashRef[Str]',
648 # # not exactly set, or delete since it works for multiple
649 # 'set' => 'add_required_methods',
650 # 'delete' => 'remove_required_methods',
651 # 'keys' => 'get_required_method_list',
652 # 'exists' => 'requires_method',
656 # # the before, around and after modifiers are
657 # # HASH keyed by method-name, with ARRAY of
658 # # CODE refs to apply in that order
660 # has 'before_method_modifiers' => (
661 # metaclass => 'Collection::Hash',
662 # reader => 'get_before_method_modifiers_map',
663 # isa => 'HashRef[ArrayRef[CodeRef]]',
665 # 'keys' => 'get_before_method_modifiers',
666 # 'exists' => 'has_before_method_modifiers',
667 # # This actually makes sure there is an
668 # # ARRAY at the given key, and pushed onto
669 # # it. It also checks for duplicates as well
670 # # 'add' => 'add_before_method_modifier'
674 # has 'after_method_modifiers' => (
675 # metaclass => 'Collection::Hash',
676 # reader =>'get_after_method_modifiers_map',
677 # isa => 'HashRef[ArrayRef[CodeRef]]',
679 # 'keys' => 'get_after_method_modifiers',
680 # 'exists' => 'has_after_method_modifiers',
681 # # This actually makes sure there is an
682 # # ARRAY at the given key, and pushed onto
683 # # it. It also checks for duplicates as well
684 # # 'add' => 'add_after_method_modifier'
688 # has 'around_method_modifiers' => (
689 # metaclass => 'Collection::Hash',
690 # reader =>'get_around_method_modifiers_map',
691 # isa => 'HashRef[ArrayRef[CodeRef]]',
693 # 'keys' => 'get_around_method_modifiers',
694 # 'exists' => 'has_around_method_modifiers',
695 # # This actually makes sure there is an
696 # # ARRAY at the given key, and pushed onto
697 # # it. It also checks for duplicates as well
698 # # 'add' => 'add_around_method_modifier'
702 # # override is similar to the other modifiers
703 # # except that it is not an ARRAY of code refs
704 # # but instead just a single name->code mapping
706 # has 'override_method_modifiers' => (
707 # metaclass => 'Collection::Hash',
708 # reader =>'get_override_method_modifiers_map',
709 # isa => 'HashRef[CodeRef]',
711 # 'keys' => 'get_override_method_modifier',
712 # 'exists' => 'has_override_method_modifier',
713 # 'add' => 'add_override_method_modifier', # checks for local method ..
717 #####################################################################
728 Moose::Meta::Role - The Moose Role metaclass
732 This class is a subclass of L<Class::MOP::Module> that provides
733 additional Moose-specific functionality.
735 It's API looks a lot like L<Moose::Meta::Class>, but internally it
736 implements many things differently. This may change in the future.
740 C<Moose::Meta::Role> is a subclass of L<Class::MOP::Module>.
748 =item B<< Moose::Meta::Role->initialize($role_name) >>
750 This method creates a new role object with the provided name.
752 =item B<< Moose::Meta::Role->combine( [ $role => { ... } ], [ $role ], ... ) >>
754 This method accepts a list of array references. Each array reference
755 should contain a role name as its first element. The second element is
756 an optional hash reference. The hash reference can contain C<exclude>
757 and C<alias> keys to control how methods are composed from the role.
759 The return value is a new L<Moose::Meta::Role::Composite> that
760 represents the combined roles.
762 =item B<< Moose::Meta::Role->create($name, %options) >>
764 This method is identical to the L<Moose::Meta::Class> C<create>
767 =item B<< Moose::Meta::Role->create_anon_role >>
769 This method is identical to the L<Moose::Meta::Class>
770 C<create_anon_class> method.
772 =item B<< $metarole->is_anon_role >>
774 Returns true if the role is an anonymous role.
778 =head2 Role application
782 =item B<< $metarole->apply( $thing, @options ) >>
784 This method applies a role to the given C<$thing>. That can be another
785 L<Moose::Meta::Role>, object, a L<Moose::Meta::Class> object, or a
786 (non-meta) object instance.
788 The options are passed directly to the constructor for the appropriate
789 L<Moose::Meta::Role::Application> subclass.
791 Note that this will apply the role even if the C<$thing> in question already
792 C<does> this role. L<Moose::Util/does_role> is a convenient wrapper for
793 finding out if role application is necessary.
797 =head2 Roles and other roles
801 =item B<< $metarole->get_roles >>
803 This returns an array reference of roles which this role does. This
804 list may include duplicates.
806 =item B<< $metarole->calculate_all_roles >>
808 This returns a I<unique> list of all roles that this role does, and
809 all the roles that its roles do.
811 =item B<< $metarole->does_role($role_name) >>
813 Given a role I<name>, returns true if this role does the given
816 =item B<< $metarole->add_role($role) >>
818 Given a L<Moose::Meta::Role> object, this adds the role to the list of
819 roles that the role does.
821 =item B<< $metarole->get_excluded_roles_list >>
823 Returns a list of role names which this role excludes.
825 =item B<< $metarole->excludes_role($role_name) >>
827 Given a role I<name>, returns true if this role excludes the named
830 =item B<< $metarole->add_excluded_roles(@role_names) >>
832 Given one or more role names, adds those roles to the list of excluded
839 The methods for dealing with a role's methods are all identical in API
840 and behavior to the same methods in L<Class::MOP::Class>.
844 =item B<< $metarole->method_metaclass >>
846 Returns the method metaclass name for the role. This defaults to
847 L<Moose::Meta::Role::Method>.
849 =item B<< $metarole->get_method($name) >>
851 =item B<< $metarole->has_method($name) >>
853 =item B<< $metarole->add_method( $name, $body ) >>
855 =item B<< $metarole->get_method_list >>
857 =item B<< $metarole->get_method_map >>
859 =item B<< $metarole->find_method_by_name($name) >>
861 These methods are all identical to the methods of the same name in
868 As with methods, the methods for dealing with a role's attribute are
869 all identical in API and behavior to the same methods in
870 L<Class::MOP::Class>.
872 However, attributes stored in this class are I<not> stored as
873 objects. Rather, the attribute definition is stored as a hash
874 reference. When a role is composed into a class, this hash reference
875 is passed directly to the metaclass's C<add_attribute> method.
877 This is quite likely to change in the future.
881 =item B<< $metarole->get_attribute($attribute_name) >>
883 =item B<< $metarole->has_attribute($attribute_name) >>
885 =item B<< $metarole->get_attribute_map >>
887 =item B<< $metarole->get_attribute_list >>
889 =item B<< $metarole->add_attribute($name, %options) >>
891 =item B<< $metarole->remove_attribute($attribute_name) >>
895 =head2 Required methods
899 =item B<< $metarole->get_required_method_list >>
901 Returns the list of methods required by the role.
903 =item B<< $metarole->requires_method($name) >>
905 Returns true if the role requires the named method.
907 =item B<< $metarole->add_required_methods(@names) >>
909 Adds the named methods to the role's list of required methods.
911 =item B<< $metarole->remove_required_methods(@names) >>
913 Removes the named methods to the role's list of required methods.
917 =head2 Method modifiers
919 These methods act like their counterparts in L<Class::Mop::Class> and
920 L<Moose::Meta::Class>.
922 However, method modifiers are simply stored internally, and are not
923 applied until the role itself is applied to a class.
927 =item B<< $metarole->add_after_method_modifier($method_name, $method) >>
929 =item B<< $metarole->add_around_method_modifier($method_name, $method) >>
931 =item B<< $metarole->add_before_method_modifier($method_name, $method) >>
933 =item B<< $metarole->add_override_method_modifier($method_name, $method) >>
935 These methods all add an appropriate modifier to the internal list of
938 =item B<< $metarole->has_after_method_modifiers >>
940 =item B<< $metarole->has_around_method_modifiers >>
942 =item B<< $metarole->has_before_method_modifiers >>
944 =item B<< $metarole->has_override_method_modifier >>
946 Return true if the role has any modifiers of the given type.
948 =item B<< $metarole->get_after_method_modifiers($method_name) >>
950 =item B<< $metarole->get_around_method_modifiers($method_name) >>
952 =item B<< $metarole->get_before_method_modifiers($method_name) >>
954 Given a method name, returns a list of the appropriate modifiers for
957 =item B<< $metarole->get_override_method_modifier($method_name) >>
959 Given a method name, returns the override method modifier for that
960 method, if it has one.
968 =item B<< Moose::Meta::Role->meta >>
970 This will return a L<Class::MOP::Class> instance for this class.
976 All complex software has bugs lurking in it, and this module is no
977 exception. If you find a bug please either email me, or add the bug
982 Stevan Little E<lt>stevan@iinteractive.comE<gt>
984 =head1 COPYRIGHT AND LICENSE
986 Copyright 2006-2009 by Infinity Interactive, Inc.
988 L<http://www.iinteractive.com>
990 This library is free software; you can redistribute it and/or modify
991 it under the same terms as Perl itself.