line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::Response::JSON::Path; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: use JSON::Path for searching JSON responses |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
691108
|
use Class::Method::Modifiers qw/install_modifier/; |
|
2
|
|
|
|
|
3555
|
|
|
2
|
|
|
|
|
172
|
|
6
|
2
|
|
|
2
|
|
657
|
use Mojo::Message; |
|
2
|
|
|
|
|
325962
|
|
|
2
|
|
|
|
|
38
|
|
7
|
2
|
|
|
2
|
|
1390
|
use JSON::Path; |
|
2
|
|
|
|
|
122455
|
|
|
2
|
|
|
|
|
25
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
2
|
|
|
2
|
|
32
|
my $class = shift; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
install_modifier "Mojo::Message", 'around', 'json', |
13
|
|
|
|
|
|
|
sub { |
14
|
2
|
|
|
2
|
|
23464
|
my $orig = shift; |
15
|
2
|
|
|
|
|
4
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
2
|
100
|
|
|
|
8
|
if (@_) { |
18
|
1
|
|
|
|
|
11
|
return JSON::Path->new($_[0])->value($orig->($self)); |
19
|
|
|
|
|
|
|
} else { |
20
|
1
|
|
|
|
|
6
|
return $orig->($self); |
21
|
|
|
|
|
|
|
} |
22
|
2
|
|
|
|
|
19
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1 |
26
|
|
|
|
|
|
|
|