1 package MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped;
4 # ABSTRACT: proxy attributes of wrapped methods if their metaclass supports it
7 use Moose::Util qw/does_role/;
8 use MooseX::MethodAttributes::Role::Meta::Method::Wrapped;
10 use namespace::clean -except => 'meta';
12 override wrap => sub {
14 my $original_method = $self->get_original_method;
16 does_role($original_method, 'MooseX::MethodAttributes::Role::Meta::Method')
17 || does_role($original_method, 'MooseX::MethodAttributes::Role::Meta::Method::Wrapped')
19 MooseX::MethodAttributes::Role::Meta::Method::Wrapped->meta->apply($self);
32 MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped - proxy attributes of wrapped methods if their metaclass supports it
40 Florian Ragwitz <rafl@debian.org>
41 Tomas Doran <bobtfish@bobtfish.net>
43 =head1 COPYRIGHT AND LICENSE
45 This software is copyright (c) 2009 by Florian Ragwitz.
47 This is free software; you can redistribute it and/or modify it under
48 the same terms as perl itself.