line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ark::Request; |
2
|
61
|
|
|
61
|
|
50737
|
use Mouse; |
|
61
|
|
|
|
|
42127
|
|
|
61
|
|
|
|
|
513
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
extends 'Plack::Request::WithEncoding'; |
5
|
|
|
|
|
|
|
|
6
|
61
|
|
|
61
|
|
115536
|
use Path::AttrRouter::Match; |
|
61
|
|
|
|
|
111760
|
|
|
61
|
|
|
|
|
3288
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has match => ( |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
isa => 'Path::AttrRouter::Match', |
11
|
|
|
|
|
|
|
handles => [qw/action args captures/], |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
{ |
15
|
61
|
|
|
61
|
|
452
|
no warnings 'once'; |
|
61
|
|
|
|
|
119
|
|
|
61
|
|
|
|
|
3831
|
|
16
|
|
|
|
|
|
|
*arguments = \&args; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
61
|
|
|
61
|
|
1004
|
no Mouse; |
|
61
|
|
|
|
|
139
|
|
|
61
|
|
|
|
|
426
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# for backward compatible |
22
|
|
|
|
|
|
|
sub wrap { |
23
|
0
|
|
|
0
|
0
|
0
|
my ($class, $req) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
0
|
warn 'Ark::Request#wrap is deprecated. use new() directory instead'; |
26
|
0
|
|
|
|
|
0
|
return $class->new( $req->env ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub uri { |
30
|
1
|
|
|
1
|
1
|
1344
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
33
|
|
|
21
|
$self->{uri} ||= $self->SUPER::uri; |
33
|
1
|
|
|
|
|
8888
|
$self->{uri}->clone; # avoid destructive opearation |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub base { |
37
|
11
|
|
|
11
|
1
|
1067
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
11
|
|
33
|
|
|
122
|
$self->{base} ||= $self->SUPER::base; |
40
|
11
|
|
|
|
|
2470
|
$self->{base}->clone; # avoid destructive operation |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub uri_with { |
44
|
0
|
|
|
0
|
0
|
|
my ($self, $args) = @_; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
my $uri = $self->uri; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my %params = $uri->query_form; |
49
|
0
|
|
|
|
|
|
while (my ($k, $v) = each %$args) { |
50
|
0
|
|
|
|
|
|
$params{$k} = $v; |
51
|
|
|
|
|
|
|
} |
52
|
0
|
|
|
|
|
|
$uri->query_form(%params); |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
return $uri; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |