Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / i486-linux-gnu-thread-multi / MooseX / Role / WithOverloading / Meta / Role / Application / ToRole.pm
1 package MooseX::Role::WithOverloading::Meta::Role::Application::ToRole;
2 our $VERSION = '0.03';
3
4
5 # ABSTRACT: Roles which support overloading
6
7 use Moose::Role;
8 use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToClass';
9 use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance';
10 use namespace::autoclean;
11
12 with 'MooseX::Role::WithOverloading::Meta::Role::Application';
13
14 around apply => sub {
15     my ($next, $self, $role1, $role2) = @_;
16     return $self->$next(
17         $role1,
18         Moose::Util::MetaRole::apply_metaclass_roles(
19             for_class                           => $role2,
20             application_to_class_class_roles    => [ ToClass     ],
21             application_to_role_class_roles     => [ __PACKAGE__ ],
22             application_to_instance_class_roles => [ ToInstance  ],
23         ),
24     );
25 };
26
27 1;
28
29 __END__
30 =pod
31
32 =head1 NAME
33
34 MooseX::Role::WithOverloading::Meta::Role::Application::ToRole - Roles which support overloading
35
36 =head1 VERSION
37
38 version 0.03
39
40 =head1 AUTHORS
41
42 Florian Ragwitz <rafl@debian.org>
43 Tomas Doran <bobtfish@bobtfish.net>
44
45 =head1 COPYRIGHT AND LICENSE
46
47 This software is copyright (c) 2009 by Florian Ragwitz.
48
49 This is free software; you can redistribute it and/or modify it under
50 the same terms as the Perl 5 programming language system itself.
51
52 =cut
53