line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::HTTP::UA::Mojo::Proxy; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
5
|
2
|
|
|
2
|
|
11
|
use Mojo::Base 'Mojo::UserAgent::Proxy'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Proxy class for Test2::Tools::HTTP::UA::Mojo |
8
|
|
|
|
|
|
|
our $VERSION = '0.04'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'apps'; |
12
|
|
|
|
|
|
|
has 'apps_proxy_url'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub prepare |
15
|
|
|
|
|
|
|
{ |
16
|
17
|
|
|
17
|
1
|
15083
|
my ($self, $tx) = @_; |
17
|
|
|
|
|
|
|
|
18
|
17
|
100
|
|
|
|
64
|
if($self->apps->uri_to_app($tx->req->url."")) |
19
|
|
|
|
|
|
|
{ |
20
|
2
|
|
|
|
|
802
|
$tx->req->proxy($self->apps_proxy_url); |
21
|
2
|
|
|
|
|
31
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
else |
24
|
|
|
|
|
|
|
{ |
25
|
15
|
|
|
|
|
7230
|
return $self->SUPER::prepare($tx); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |