Tweaks
[gitmo/Mouse.git] / lib / Squirrel / Role.pm
CommitLineData
ce2ee568 1package Squirrel::Role;
ce2ee568 2use strict;
3use warnings;
4
382b7340 5use base qw(Squirrel);
6
ce2ee568 7sub _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 251;
26
1820fffe 27__END__
28
29=head1 NAME
30
179ac6cc 31Squirrel::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
39C<Squirrel::Role> is deprecated. C<Any::Moose> provides the same functionality,
40but better. :)
41
42=head1 SEE ALSO
43
44L<Any::Moose>
45
1820fffe 46=cut
47