line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Path::Dispatcher::Path; |
2
|
32
|
|
|
32
|
|
138
|
use Any::Moose; |
|
32
|
|
|
|
|
46
|
|
|
32
|
|
|
|
|
142
|
|
3
|
|
|
|
|
|
|
|
4
|
32
|
|
|
32
|
|
44360
|
use overload q{""} => sub { shift->path }; |
|
32
|
|
|
5
|
|
25444
|
|
|
32
|
|
|
|
|
275
|
|
|
5
|
|
|
|
|
899
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has path => ( |
7
|
|
|
|
|
|
|
is => 'ro', |
8
|
|
|
|
|
|
|
isa => 'Str', |
9
|
|
|
|
|
|
|
predicate => 'has_path', |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has metadata => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'HashRef', |
15
|
|
|
|
|
|
|
predicate => 'has_metadata', |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# allow Path::Dispatcher::Path->new($path) |
19
|
|
|
|
|
|
|
sub BUILDARGS { |
20
|
156
|
|
|
156
|
1
|
7637
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
156
|
100
|
66
|
|
|
522
|
if (@_ == 1 && !ref($_[0])) { |
23
|
26
|
|
|
|
|
50
|
unshift @_, 'path'; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
156
|
|
|
|
|
1327
|
$self->SUPER::BUILDARGS(@_); |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub clone_path { |
30
|
201
|
|
|
201
|
0
|
201
|
my $self = shift; |
31
|
201
|
|
|
|
|
147
|
my $path = shift; |
32
|
|
|
|
|
|
|
|
33
|
201
|
|
|
|
|
387
|
return $self->meta->clone_object($self, path => $path, @_); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub get_metadata { |
37
|
3
|
|
|
3
|
0
|
4
|
my $self = shift; |
38
|
3
|
|
|
|
|
6
|
my $name = shift; |
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
|
|
14
|
return $self->metadata->{$name}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
44
|
32
|
|
|
32
|
|
5756
|
no Any::Moose; |
|
32
|
|
|
|
|
50
|
|
|
32
|
|
|
|
|
176
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |