Tweaks
[gitmo/Mouse.git] / lib / Squirrel / Role.pm
1 package Squirrel::Role;
2 use strict;
3 use warnings;
4
5 use base qw(Squirrel);
6
7 sub _choose_backend {
8     if ( $INC{"Moose/Role.pm"} ) {
9         return {
10             backend  => 'Moose::Role',
11             import   => \&Moose::Role::import,
12             unimport => \&Moose::Role::unimport,
13         }
14     }
15     else {
16         require Mouse::Role;
17         return {
18             backend  => 'Mouse::Role',
19             import   => \&Mouse::Role::import,
20             unimport => \&Mouse::Role::unimport,
21         }
22     }
23 }
24
25 1;
26
27 __END__
28
29 =head1 NAME
30
31 Squirrel::Role - Use Mouse::Role, unless Moose::Role is already loaded. (DEPRECATED)
32
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
46 =cut
47