line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mock::Furl::Request; |
2
|
6
|
|
|
6
|
|
21979
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
201
|
|
3
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
144
|
|
4
|
6
|
|
|
6
|
|
861
|
use Test::MockObject; |
|
6
|
|
|
|
|
9059
|
|
|
6
|
|
|
|
|
34
|
|
5
|
6
|
|
|
6
|
|
1052
|
use parent 'Exporter'; |
|
6
|
|
|
|
|
301
|
|
|
6
|
|
|
|
|
37
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw/$Mock_furl_req $Mock_furl_request/; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $Mock_furl_req; |
9
|
|
|
|
|
|
|
our $Mock_furl_request; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
6
|
|
|
6
|
|
919
|
$Mock_furl_request = $Mock_furl_req = Test::MockObject->new; |
13
|
|
|
|
|
|
|
$Mock_furl_req->fake_module( |
14
|
|
|
|
|
|
|
'Furl::Request', |
15
|
|
|
|
|
|
|
new => sub { |
16
|
1
|
|
|
1
|
|
97
|
$Mock_furl_req->{new_args} = [@_]; |
17
|
1
|
|
|
|
|
4
|
$Mock_furl_req; |
18
|
|
|
|
|
|
|
} |
19
|
6
|
|
|
|
|
101
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$Mock_furl_req->set_always('authorization_basic' => ''); |
23
|
|
|
|
|
|
|
$Mock_furl_req->set_always('header' => ''); |
24
|
|
|
|
|
|
|
$Mock_furl_req->set_always('content' => ''); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
0
|
|
|
0
|
1
|
|
$Mock_furl_req; |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$Mock_furl_req->mock( |
31
|
|
|
|
|
|
|
'-new_args' => sub { |
32
|
|
|
|
|
|
|
delete $Mock_furl_req->{new_args}; |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
package # hide from PAUSE |
37
|
|
|
|
|
|
|
Furl::Request; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
our $VERSION = 'Mocked'; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |