Adding a role changes the method map, but it will not change the
[gitmo/Moose.git] / lib / Moose / Meta / Role.pm
CommitLineData
e185c027 1
2package Moose::Meta::Role;
3
4use strict;
5use warnings;
6use metaclass;
7
bdabd620 8use Carp 'confess';
21f1e231 9use Scalar::Util 'blessed';
bdabd620 10
75b95414 11our $VERSION = '0.55_01';
12$VERSION = eval $VERSION;
d44714be 13our $AUTHORITY = 'cpan:STEVAN';
e185c027 14
8ee73eeb 15use Moose::Meta::Class;
39b3bc94 16use Moose::Meta::Role::Method;
d67145ed 17use Moose::Meta::Role::Method::Required;
8ee73eeb 18
68efb014 19use base 'Class::MOP::Module';
80572233 20
fb1e11d5 21## ------------------------------------------------------------------
22## NOTE:
23## I normally don't do this, but I am doing
24## a whole bunch of meta-programmin in this
25## module, so it just makes sense. For a clearer
26## picture of what is going on in the next
27## several lines of code, look at the really
28## big comment at the end of this file (right
29## before the POD).
30## - SL
31## ------------------------------------------------------------------
80572233 32
21716c07 33my $META = __PACKAGE__->meta;
34
35## ------------------------------------------------------------------
36## attributes ...
e185c027 37
21716c07 38# NOTE:
39# since roles are lazy, we hold all the attributes
fb1e11d5 40# of the individual role in 'statis' until which
41# time when it is applied to a class. This means
42# keeping a lot of things in hash maps, so we are
21716c07 43# using a little of that meta-programmin' magic
fb1e11d5 44# here an saving lots of extra typin. And since
45# many of these attributes above require similar
46# functionality to support them, so we again use
47# the wonders of meta-programmin' to deliver a
21716c07 48# very compact solution to this normally verbose
49# problem.
50# - SL
51
52foreach my $action (
fb1e11d5 53 {
54 name => 'excluded_roles_map',
55 attr_reader => 'get_excluded_roles_map' ,
21716c07 56 methods => {
fb1e11d5 57 add => 'add_excluded_roles',
58 get_list => 'get_excluded_roles_list',
59 existence => 'excludes_role',
21716c07 60 }
61 },
fb1e11d5 62 {
63 name => 'required_methods',
21716c07 64 attr_reader => 'get_required_methods_map',
65 methods => {
fb1e11d5 66 add => 'add_required_methods',
21716c07 67 remove => 'remove_required_methods',
68 get_list => 'get_required_method_list',
69 existence => 'requires_method',
70 }
709c321c 71 },
21716c07 72 {
fb1e11d5 73 name => 'attribute_map',
21716c07 74 attr_reader => 'get_attribute_map',
75 methods => {
76 get => 'get_attribute',
77 get_list => 'get_attribute_list',
78 existence => 'has_attribute',
79 remove => 'remove_attribute',
80 }
81 }
82) {
fb1e11d5 83
21716c07 84 my $attr_reader = $action->{attr_reader};
85 my $methods = $action->{methods};
fb1e11d5 86
87 # create the attribute
88 $META->add_attribute($action->{name} => (
89 reader => $attr_reader,
90 default => sub { {} }
91 ));
92
93 # create some helper methods
21716c07 94 $META->add_method($methods->{add} => sub {
95 my ($self, @values) = @_;
fb1e11d5 96 $self->$attr_reader->{$_} = undef foreach @values;
21716c07 97 }) if exists $methods->{add};
fb1e11d5 98
21716c07 99 $META->add_method($methods->{get_list} => sub {
100 my ($self) = @_;
fb1e11d5 101 keys %{$self->$attr_reader};
102 }) if exists $methods->{get_list};
103
21716c07 104 $META->add_method($methods->{get} => sub {
105 my ($self, $name) = @_;
fb1e11d5 106 $self->$attr_reader->{$name}
107 }) if exists $methods->{get};
108
21716c07 109 $META->add_method($methods->{existence} => sub {
110 my ($self, $name) = @_;
fb1e11d5 111 exists $self->$attr_reader->{$name} ? 1 : 0;
112 }) if exists $methods->{existence};
113
21716c07 114 $META->add_method($methods->{remove} => sub {
115 my ($self, @values) = @_;
116 delete $self->$attr_reader->{$_} foreach @values;
fb1e11d5 117 }) if exists $methods->{remove};
21716c07 118}
d79e62fd 119
21716c07 120## some things don't always fit, so they go here ...
80572233 121
21716c07 122sub add_attribute {
123 my $self = shift;
124 my $name = shift;
125 my $attr_desc;
126 if (scalar @_ == 1 && ref($_[0]) eq 'HASH') {
127 $attr_desc = $_[0];
128 }
129 else {
130 $attr_desc = { @_ };
131 }
132 $self->get_attribute_map->{$name} = $attr_desc;
133}
e185c027 134
bca01282 135# DEPRECATED
136# sub _clean_up_required_methods {
137# my $self = shift;
138# foreach my $method ($self->get_required_method_list) {
139# $self->remove_required_methods($method)
140# if $self->has_method($method);
141# }
142# }
1331430a 143
21716c07 144## ------------------------------------------------------------------
145## method modifiers
146
21716c07 147# NOTE:
fb1e11d5 148# the before/around/after method modifiers are
21716c07 149# stored by name, but there can be many methods
150# then associated with that name. So again we have
151# lots of similar functionality, so we can do some
152# meta-programmin' and save some time.
153# - SL
154
155foreach my $modifier_type (qw[ before around after ]) {
fb1e11d5 156
157 my $attr_reader = "get_${modifier_type}_method_modifiers_map";
21716c07 158
fb1e11d5 159 # create the attribute ...
160 $META->add_attribute("${modifier_type}_method_modifiers" => (
161 reader => $attr_reader,
162 default => sub { {} }
163 ));
164
165 # and some helper methods ...
21716c07 166 $META->add_method("get_${modifier_type}_method_modifiers" => sub {
167 my ($self, $method_name) = @_;
fb1e11d5 168 #return () unless exists $self->$attr_reader->{$method_name};
21716c07 169 @{$self->$attr_reader->{$method_name}};
170 });
fb1e11d5 171
21716c07 172 $META->add_method("has_${modifier_type}_method_modifiers" => sub {
173 my ($self, $method_name) = @_;
174 # NOTE:
fb1e11d5 175 # for now we assume that if it exists,..
21716c07 176 # it has at least one modifier in it
177 (exists $self->$attr_reader->{$method_name}) ? 1 : 0;
fb1e11d5 178 });
179
21716c07 180 $META->add_method("add_${modifier_type}_method_modifier" => sub {
181 my ($self, $method_name, $method) = @_;
fb1e11d5 182
183 $self->$attr_reader->{$method_name} = []
21716c07 184 unless exists $self->$attr_reader->{$method_name};
fb1e11d5 185
21716c07 186 my $modifiers = $self->$attr_reader->{$method_name};
fb1e11d5 187
21716c07 188 # NOTE:
fb1e11d5 189 # check to see that we aren't adding the
190 # same code twice. We err in favor of the
21716c07 191 # first on here, this may not be as expected
192 foreach my $modifier (@{$modifiers}) {
193 return if $modifier == $method;
194 }
fb1e11d5 195
21716c07 196 push @{$modifiers} => $method;
197 });
fb1e11d5 198
21716c07 199}
1331430a 200
21716c07 201## ------------------------------------------------------------------
202## override method mofidiers
0558683c 203
fb1e11d5 204$META->add_attribute('override_method_modifiers' => (
205 reader => 'get_override_method_modifiers_map',
206 default => sub { {} }
207));
208
21716c07 209# NOTE:
fb1e11d5 210# these are a little different because there
21716c07 211# can only be one per name, whereas the other
212# method modifiers can have multiples.
213# - SL
0558683c 214
21716c07 215sub add_override_method_modifier {
216 my ($self, $method_name, $method) = @_;
217 (!$self->has_method($method_name))
fb1e11d5 218 || confess "Cannot add an override of method '$method_name' " .
21716c07 219 "because there is a local version of '$method_name'";
fb1e11d5 220 $self->get_override_method_modifiers_map->{$method_name} = $method;
21716c07 221}
0558683c 222
21716c07 223sub has_override_method_modifier {
224 my ($self, $method_name) = @_;
225 # NOTE:
fb1e11d5 226 # for now we assume that if it exists,..
21716c07 227 # it has at least one modifier in it
fb1e11d5 228 (exists $self->get_override_method_modifiers_map->{$method_name}) ? 1 : 0;
21716c07 229}
0558683c 230
21716c07 231sub get_override_method_modifier {
232 my ($self, $method_name) = @_;
fb1e11d5 233 $self->get_override_method_modifiers_map->{$method_name};
21716c07 234}
0558683c 235
21716c07 236## general list accessor ...
80572233 237
21716c07 238sub get_method_modifier_list {
239 my ($self, $modifier_type) = @_;
fb1e11d5 240 my $accessor = "get_${modifier_type}_method_modifiers_map";
21716c07 241 keys %{$self->$accessor};
242}
e185c027 243
e4be0297 244sub reset_package_cache_flag { (shift)->{'_package_cache_flag'} = undef }
245sub update_package_cache_flag {
246 my $self = shift;
247 $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name);
248}
249
250
251
21716c07 252## ------------------------------------------------------------------
80572233 253## subroles
254
21716c07 255__PACKAGE__->meta->add_attribute('roles' => (
256 reader => 'get_roles',
257 default => sub { [] }
258));
259
80572233 260sub add_role {
261 my ($self, $role) = @_;
262 (blessed($role) && $role->isa('Moose::Meta::Role'))
263 || confess "Roles must be instances of Moose::Meta::Role";
264 push @{$self->get_roles} => $role;
2bed5697 265 $self->reset_package_cache_flag;
80572233 266}
267
b8aeb4dc 268sub calculate_all_roles {
269 my $self = shift;
270 my %seen;
fb1e11d5 271 grep {
272 !$seen{$_->name}++
273 } ($self, map {
274 $_->calculate_all_roles
275 } @{ $self->get_roles });
b8aeb4dc 276}
277
80572233 278sub does_role {
279 my ($self, $role_name) = @_;
280 (defined $role_name)
281 || confess "You must supply a role name to look for";
bdabd620 282 # if we are it,.. then return true
283 return 1 if $role_name eq $self->name;
284 # otherwise.. check our children
80572233 285 foreach my $role (@{$self->get_roles}) {
bdabd620 286 return 1 if $role->does_role($role_name);
80572233 287 }
288 return 0;
289}
290
21716c07 291## ------------------------------------------------------------------
fb1e11d5 292## methods
1331430a 293
21716c07 294sub method_metaclass { 'Moose::Meta::Role::Method' }
80572233 295
fb1e11d5 296sub get_method_map {
093b12c2 297 my $self = shift;
6b76efa4 298
299 my $current = Class::MOP::check_package_cache_flag($self->name);
300
301 if (defined $self->{'_package_cache_flag'} && $self->{'_package_cache_flag'} == $current) {
302 return $self->{'methods'} ||= {};
303 }
304
305 $self->{_package_cache_flag} = $current;
306
307 my $map = $self->{'methods'} ||= {};
fb1e11d5 308
309 my $role_name = $self->name;
310 my $method_metaclass = $self->method_metaclass;
311
0addec44 312 my %all_code = $self->get_all_package_symbols('CODE');
fb1e11d5 313
0addec44 314 foreach my $symbol (keys %all_code) {
315 my $code = $all_code{$symbol};
fb1e11d5 316
6b76efa4 317 next if exists $map->{$symbol} &&
318 defined $map->{$symbol} &&
319 $map->{$symbol}->body == $code;
320
fb1e11d5 321 my ($pkg, $name) = Class::MOP::get_code_info($code);
322
323 if ($pkg->can('meta')
324 # NOTE:
325 # we don't know what ->meta we are calling
326 # here, so we need to be careful cause it
327 # just might blow up at us, or just complain
328 # loudly (in the case of Curses.pm) so we
329 # just be a little overly cautious here.
330 # - SL
6b76efa4 331 && eval { no warnings; blessed($pkg->meta) } # FIXME calls meta
fb1e11d5 332 && $pkg->meta->isa('Moose::Meta::Role')) {
333 my $role = $pkg->meta->name;
334 next unless $self->does_role($role);
335 }
336 else {
2887c827 337 # NOTE:
338 # in 5.10 constant.pm the constants show up
339 # as being in the right package, but in pre-5.10
340 # they show up as constant::__ANON__ so we
341 # make an exception here to be sure that things
342 # work as expected in both.
343 # - SL
344 unless ($pkg eq 'constant' && $name eq '__ANON__') {
345 next if ($pkg || '') ne $role_name ||
346 (($name || '') ne '__ANON__' && ($pkg || '') ne $role_name);
347 }
fb1e11d5 348 }
c4538447 349
1b2aea39 350 $map->{$symbol} = $method_metaclass->wrap(
351 $code,
352 package_name => $role_name,
353 name => $name
354 );
fb1e11d5 355 }
356
357 return $map;
093b12c2 358}
359
fb1e11d5 360sub get_method {
361 my ($self, $name) = @_;
c4538447 362 $self->get_method_map->{$name};
fb1e11d5 363}
40e89659 364
fb1e11d5 365sub has_method {
366 my ($self, $name) = @_;
367 exists $self->get_method_map->{$name} ? 1 : 0
e185c027 368}
369
7d0d4928 370# FIXME this is copypasated from Class::MOP::Class
371# refactor to inherit from some common base
fb175631 372sub wrap_method_body {
373 my ( $self, %args ) = @_;
374
375 my $body = delete $args{body}; # delete is for compat
376
377 ('CODE' eq ref($body))
378 || confess "Your code block must be a CODE reference";
379
380 $self->method_metaclass->wrap( $body => (
381 package_name => $self->name,
382 %args,
383 ));
384}
385
7d0d4928 386sub add_method {
387 my ($self, $method_name, $method) = @_;
388 (defined $method_name && $method_name)
fb175631 389 || confess "You must define a method name";
7d0d4928 390
391 my $body;
392 if (blessed($method)) {
393 $body = $method->body;
394 if ($method->package_name ne $self->name &&
395 $method->name ne $method_name) {
396 warn "Hello there, got something for you."
fb175631 397 . " Method says " . $method->package_name . " " . $method->name
398 . " Class says " . $self->name . " " . $method_name;
7d0d4928 399 $method = $method->clone(
400 package_name => $self->name,
401 name => $method_name
402 ) if $method->can('clone');
403 }
404 }
405 else {
406 $body = $method;
fb175631 407 $method = $self->wrap_method_body( body => $body, name => $method_name );
7d0d4928 408 }
fb175631 409
410 $method->attach_to_class($self);
411
7d0d4928 412 $self->get_method_map->{$method_name} = $method;
413
414 my $full_method_name = ($self->name . '::' . $method_name);
415 $self->add_package_symbol(
416 { sigil => '&', type => 'CODE', name => $method_name },
417 Class::MOP::subname($full_method_name => $body)
418 );
fb175631 419
420 $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
7d0d4928 421}
422
1db8ecc7 423sub find_method_by_name { (shift)->get_method(@_) }
093b12c2 424
fb1e11d5 425sub get_method_list {
426 my $self = shift;
427 grep { !/^meta$/ } keys %{$self->get_method_map};
428}
429
430sub alias_method {
431 my ($self, $method_name, $method) = @_;
432 (defined $method_name && $method_name)
433 || confess "You must define a method name";
434
435 my $body = (blessed($method) ? $method->body : $method);
21f1e231 436 ('CODE' eq ref($body))
fb1e11d5 437 || confess "Your code block must be a CODE reference";
438
8371f6e1 439 $self->add_package_symbol(
440 { sigil => '&', type => 'CODE', name => $method_name },
441 $body
442 );
d1c3ed67 443
444 # Class::MOP::Class calls update_package_cache_flag here, but if
445 # we add it then a test in
446 # t/030_roles/012_method_exclusion_in_composition.t fails!
fb1e11d5 447}
448
21716c07 449## ------------------------------------------------------------------
fb1e11d5 450## role construction
21716c07 451## ------------------------------------------------------------------
e185c027 452
21716c07 453sub apply {
bca01282 454 my ($self, $other, @args) = @_;
455
456 (blessed($other))
457 || confess "You must pass in an blessed instance";
458
1c9db35c 459 if ($other->isa('Moose::Meta::Role')) {
460 require Moose::Meta::Role::Application::ToRole;
709c321c 461 return Moose::Meta::Role::Application::ToRole->new(@args)->apply($self, $other);
1c9db35c 462 }
463 elsif ($other->isa('Moose::Meta::Class')) {
464 require Moose::Meta::Role::Application::ToClass;
709c321c 465 return Moose::Meta::Role::Application::ToClass->new(@args)->apply($self, $other);
1c9db35c 466 }
467 else {
468 require Moose::Meta::Role::Application::ToInstance;
709c321c 469 return Moose::Meta::Role::Application::ToInstance->new(@args)->apply($self, $other);
1c9db35c 470 }
0558683c 471}
472
5b5187e0 473sub apply_to_metaclass_instance {
474 my ($self, $meta, @args) = @_;
475
476 $meta->isa('Moose::Meta::Class') || $meta->isa('Moose::Meta::Role')
477 || confess "You must pass in a Moose::Meta::Class or Moose::Meta::Role instance";
478
479 require Moose::Meta::Role::Application::ToMetaclassInstance;
480 return Moose::Meta::Role::Application::ToMetaclassInstance->new(@args)->apply($self, $meta);
481}
482
21716c07 483sub combine {
a4e516f6 484 my ($class, @role_specs) = @_;
21716c07 485
fb1e11d5 486 require Moose::Meta::Role::Application::RoleSummation;
a4e516f6 487 require Moose::Meta::Role::Composite;
488
28412c0b 489 my (@roles, %role_params);
490 while (@role_specs) {
491 my ($role, $params) = @{ splice @role_specs, 0, 1 };
492 push @roles => $role->meta;
493 next unless defined $params;
494 $role_params{$role} = $params;
495 }
21716c07 496
fb1e11d5 497 my $c = Moose::Meta::Role::Composite->new(roles => \@roles);
a4e516f6 498 Moose::Meta::Role::Application::RoleSummation->new(
28412c0b 499 role_params => \%role_params
a4e516f6 500 )->apply($c);
28412c0b 501
fb1e11d5 502 return $c;
0558683c 503}
504
fb1e11d5 505#####################################################################
506## NOTE:
507## This is Moose::Meta::Role as defined by Moose (plus the use of
508## MooseX::AttributeHelpers module). It is here as a reference to
509## make it easier to see what is happening above with all the meta
510## programming. - SL
511#####################################################################
512#
513# has 'roles' => (
514# metaclass => 'Collection::Array',
515# reader => 'get_roles',
516# isa => 'ArrayRef[Moose::Meta::Roles]',
517# default => sub { [] },
518# provides => {
519# 'push' => 'add_role',
520# }
521# );
522#
523# has 'excluded_roles_map' => (
524# metaclass => 'Collection::Hash',
525# reader => 'get_excluded_roles_map',
526# isa => 'HashRef[Str]',
527# provides => {
528# # Not exactly set, cause it sets multiple
529# 'set' => 'add_excluded_roles',
530# 'keys' => 'get_excluded_roles_list',
531# 'exists' => 'excludes_role',
532# }
533# );
534#
535# has 'attribute_map' => (
536# metaclass => 'Collection::Hash',
537# reader => 'get_attribute_map',
538# isa => 'HashRef[Str]',
539# provides => {
540# # 'set' => 'add_attribute' # has some special crap in it
541# 'get' => 'get_attribute',
542# 'keys' => 'get_attribute_list',
543# 'exists' => 'has_attribute',
544# # Not exactly delete, cause it sets multiple
545# 'delete' => 'remove_attribute',
546# }
547# );
548#
549# has 'required_methods' => (
550# metaclass => 'Collection::Hash',
551# reader => 'get_required_methods_map',
552# isa => 'HashRef[Str]',
553# provides => {
554# # not exactly set, or delete since it works for multiple
555# 'set' => 'add_required_methods',
556# 'delete' => 'remove_required_methods',
557# 'keys' => 'get_required_method_list',
558# 'exists' => 'requires_method',
559# }
560# );
561#
562# # the before, around and after modifiers are
563# # HASH keyed by method-name, with ARRAY of
564# # CODE refs to apply in that order
565#
566# has 'before_method_modifiers' => (
567# metaclass => 'Collection::Hash',
568# reader => 'get_before_method_modifiers_map',
569# isa => 'HashRef[ArrayRef[CodeRef]]',
570# provides => {
571# 'keys' => 'get_before_method_modifiers',
572# 'exists' => 'has_before_method_modifiers',
573# # This actually makes sure there is an
574# # ARRAY at the given key, and pushed onto
575# # it. It also checks for duplicates as well
576# # 'add' => 'add_before_method_modifier'
577# }
578# );
579#
580# has 'after_method_modifiers' => (
581# metaclass => 'Collection::Hash',
582# reader =>'get_after_method_modifiers_map',
583# isa => 'HashRef[ArrayRef[CodeRef]]',
584# provides => {
585# 'keys' => 'get_after_method_modifiers',
586# 'exists' => 'has_after_method_modifiers',
587# # This actually makes sure there is an
588# # ARRAY at the given key, and pushed onto
589# # it. It also checks for duplicates as well
590# # 'add' => 'add_after_method_modifier'
591# }
592# );
593#
594# has 'around_method_modifiers' => (
595# metaclass => 'Collection::Hash',
596# reader =>'get_around_method_modifiers_map',
597# isa => 'HashRef[ArrayRef[CodeRef]]',
598# provides => {
599# 'keys' => 'get_around_method_modifiers',
600# 'exists' => 'has_around_method_modifiers',
601# # This actually makes sure there is an
602# # ARRAY at the given key, and pushed onto
603# # it. It also checks for duplicates as well
604# # 'add' => 'add_around_method_modifier'
605# }
606# );
607#
608# # override is similar to the other modifiers
609# # except that it is not an ARRAY of code refs
610# # but instead just a single name->code mapping
611#
612# has 'override_method_modifiers' => (
613# metaclass => 'Collection::Hash',
614# reader =>'get_override_method_modifiers_map',
615# isa => 'HashRef[CodeRef]',
616# provides => {
617# 'keys' => 'get_override_method_modifier',
618# 'exists' => 'has_override_method_modifier',
619# 'add' => 'add_override_method_modifier', # checks for local method ..
620# }
621# );
622#
623#####################################################################
624
625
e185c027 6261;
627
628__END__
629
630=pod
631
632=head1 NAME
633
634Moose::Meta::Role - The Moose Role metaclass
635
636=head1 DESCRIPTION
637
fb1e11d5 638Please see L<Moose::Role> for more information about roles.
d44714be 639For the most part, this has no user-serviceable parts inside
fb1e11d5 640this module. It's API is still subject to some change (although
02a0fb52 641probably not that much really).
79592a54 642
e185c027 643=head1 METHODS
644
645=over 4
646
647=item B<meta>
648
649=item B<new>
650
78cd1d3b 651=item B<apply>
652
5b5187e0 653=item B<apply_to_metaclass_instance>
654
db1ab48d 655=item B<combine>
656
e185c027 657=back
658
659=over 4
660
661=item B<name>
662
663=item B<version>
664
665=item B<role_meta>
666
667=back
668
669=over 4
670
80572233 671=item B<get_roles>
672
673=item B<add_role>
674
675=item B<does_role>
676
677=back
678
679=over 4
680
d79e62fd 681=item B<add_excluded_roles>
682
683=item B<excludes_role>
684
685=item B<get_excluded_roles_list>
686
687=item B<get_excluded_roles_map>
688
2b14ac61 689=item B<calculate_all_roles>
690
d79e62fd 691=back
692
693=over 4
694
68efb014 695=item B<method_metaclass>
696
be4427d0 697=item B<find_method_by_name>
698
e185c027 699=item B<get_method>
700
701=item B<has_method>
702
7d0d4928 703=item B<add_method>
704
fb175631 705=item B<wrap_method_body>
706
bdabd620 707=item B<alias_method>
708
e185c027 709=item B<get_method_list>
710
093b12c2 711=item B<get_method_map>
712
638853cb 713=item B<update_package_cache_flag>
714
53dd42d8 715=item B<reset_package_cache_flag>
716
e185c027 717=back
718
719=over 4
720
721=item B<add_attribute>
722
723=item B<has_attribute>
724
725=item B<get_attribute>
726
727=item B<get_attribute_list>
728
729=item B<get_attribute_map>
730
731=item B<remove_attribute>
732
733=back
734
735=over 4
736
1331430a 737=item B<add_required_methods>
738
38f1204c 739=item B<remove_required_methods>
740
1331430a 741=item B<get_required_method_list>
742
743=item B<get_required_methods_map>
744
745=item B<requires_method>
746
747=back
748
0558683c 749=over 4
750
751=item B<add_after_method_modifier>
752
753=item B<add_around_method_modifier>
754
755=item B<add_before_method_modifier>
756
757=item B<add_override_method_modifier>
758
759=over 4
760
761=back
762
763=item B<has_after_method_modifiers>
764
765=item B<has_around_method_modifiers>
766
767=item B<has_before_method_modifiers>
768
769=item B<has_override_method_modifier>
770
771=over 4
772
773=back
774
775=item B<get_after_method_modifiers>
776
777=item B<get_around_method_modifiers>
778
779=item B<get_before_method_modifiers>
780
781=item B<get_method_modifier_list>
782
783=over 4
784
785=back
786
787=item B<get_override_method_modifier>
788
789=item B<get_after_method_modifiers_map>
790
791=item B<get_around_method_modifiers_map>
792
793=item B<get_before_method_modifiers_map>
794
795=item B<get_override_method_modifiers_map>
796
797=back
798
e185c027 799=head1 BUGS
800
fb1e11d5 801All complex software has bugs lurking in it, and this module is no
e185c027 802exception. If you find a bug please either email me, or add the bug
803to cpan-RT.
804
805=head1 AUTHOR
806
807Stevan Little E<lt>stevan@iinteractive.comE<gt>
808
809=head1 COPYRIGHT AND LICENSE
810
778db3ac 811Copyright 2006-2008 by Infinity Interactive, Inc.
e185c027 812
813L<http://www.iinteractive.com>
814
815This library is free software; you can redistribute it and/or modify
fb1e11d5 816it under the same terms as Perl itself.
e185c027 817
b8aeb4dc 818=cut