line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Squirrel; |
2
|
2
|
|
|
2
|
|
438
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
3
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
404
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub _choose_backend { |
6
|
1
|
50
|
|
1
|
|
2
|
if ( $INC{"Moose.pm"} ) { |
7
|
|
|
|
|
|
|
return { |
8
|
0
|
|
|
|
|
0
|
backend => 'Moose', |
9
|
|
|
|
|
|
|
import => \&Moose::import, |
10
|
|
|
|
|
|
|
unimport => \&Moose::unimport, |
11
|
|
|
|
|
|
|
}; |
12
|
|
|
|
|
|
|
} else { |
13
|
1
|
|
|
|
|
306
|
require Mouse; |
14
|
|
|
|
|
|
|
return { |
15
|
1
|
|
|
|
|
5
|
backend => 'Mouse', |
16
|
|
|
|
|
|
|
import => \&Mouse::import, |
17
|
|
|
|
|
|
|
unimport => \&Mouse::unimport, |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my %pkgs; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _handlers { |
25
|
4
|
|
|
4
|
|
4
|
my $class = shift; |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
6
|
my $caller = caller(1); |
28
|
|
|
|
|
|
|
|
29
|
4
|
|
66
|
|
|
15
|
$pkgs{$caller} ||= $class->_choose_backend; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub import { |
33
|
2
|
|
|
2
|
|
15
|
require Carp; |
34
|
2
|
|
|
|
|
308
|
Carp::carp("Squirrel is deprecated. Please use Any::Moose instead. It fixes a number of design problems that Squirrel has."); |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
14
|
my $handlers = shift->_handlers; |
37
|
2
|
|
|
|
|
5
|
unshift @_, $handlers->{backend}; |
38
|
2
|
|
|
|
|
3
|
goto &{$handlers->{import}}; |
|
2
|
|
|
|
|
7
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub unimport { |
42
|
2
|
|
|
2
|
|
19
|
my $handlers = shift->_handlers; |
43
|
2
|
|
|
|
|
5
|
unshift @_, $handlers->{backend}; |
44
|
2
|
|
|
|
|
2
|
goto &{$handlers->{unimport}}; |
|
2
|
|
|
|
|
8
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |