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 |