Commit | Line | Data |
---|---|---|
ce2ee568 | 1 | package Squirrel::Role; |
ce2ee568 | 2 | use strict; |
3 | use warnings; | |
4 | ||
382b7340 | 5 | use base qw(Squirrel); |
6 | ||
ce2ee568 | 7 | sub _choose_backend { |
8 | if ( $INC{"Moose/Role.pm"} ) { | |
9 | return { | |
382b7340 | 10 | backend => 'Moose::Role', |
ce2ee568 | 11 | import => \&Moose::Role::import, |
382b7340 | 12 | unimport => \&Moose::Role::unimport, |
ce2ee568 | 13 | } |
382b7340 | 14 | } |
15 | else { | |
ce2ee568 | 16 | require Mouse::Role; |
17 | return { | |
382b7340 | 18 | backend => 'Mouse::Role', |
ce2ee568 | 19 | import => \&Mouse::Role::import, |
20 | unimport => \&Mouse::Role::unimport, | |
21 | } | |
22 | } | |
23 | } | |
24 | ||
ce2ee568 | 25 | 1; |
26 | ||
1820fffe | 27 | __END__ |
28 | ||
29 | =head1 NAME | |
30 | ||
179ac6cc | 31 | Squirrel::Role - Use Mouse::Role, unless Moose::Role is already loaded. (DEPRECATED) |
1820fffe | 32 | |
31c5194b | 33 | =head1 SYNOPSIS |
34 | ||
35 | use Squirrel::Role; | |
36 | ||
37 | =head1 DEPRECATION | |
38 | ||
39 | C<Squirrel::Role> is deprecated. C<Any::Moose> provides the same functionality, | |
40 | but better. :) | |
41 | ||
42 | =head1 SEE ALSO | |
43 | ||
44 | L<Any::Moose> | |
45 | ||
1820fffe | 46 | =cut |
47 |