line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Path::Dispatcher::Role::Rules; |
2
|
32
|
|
|
32
|
|
12134
|
use Any::Moose '::Role'; |
|
32
|
|
|
|
|
48
|
|
|
32
|
|
|
|
|
143
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has _rules => ( |
5
|
|
|
|
|
|
|
is => 'ro', |
6
|
|
|
|
|
|
|
isa => 'ArrayRef', |
7
|
|
|
|
|
|
|
init_arg => 'rules', |
8
|
|
|
|
|
|
|
default => sub { [] }, |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub add_rule { |
12
|
27
|
|
|
27
|
1
|
56
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$_->isa('Path::Dispatcher::Rule') |
15
|
|
|
|
|
|
|
or confess "$_ is not a Path::Dispatcher::Rule" |
16
|
27
|
|
33
|
|
|
232
|
for @_; |
17
|
|
|
|
|
|
|
|
18
|
27
|
|
|
|
|
45
|
push @{ $self->{_rules} }, @_; |
|
27
|
|
|
|
|
116
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub unshift_rule { |
22
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$_->isa('Path::Dispatcher::Rule') |
25
|
|
|
|
|
|
|
or confess "$_ is not a Path::Dispatcher::Rule" |
26
|
0
|
|
0
|
|
|
0
|
for @_; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
0
|
unshift @{ $self->{_rules} }, @_; |
|
0
|
|
|
|
|
0
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
256
|
|
|
256
|
1
|
216
|
sub rules { @{ shift->{_rules} } } |
|
256
|
|
|
|
|
741
|
|
32
|
|
|
|
|
|
|
|
33
|
32
|
|
|
32
|
|
53240
|
no Any::Moose; |
|
32
|
|
|
|
|
58
|
|
|
32
|
|
|
|
|
161
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |