line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Azure::EventHubs::Request; |
2
|
7
|
|
|
7
|
|
112355
|
use strict; |
|
7
|
|
|
|
|
30
|
|
|
7
|
|
|
|
|
163
|
|
3
|
7
|
|
|
7
|
|
32
|
use warnings; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
158
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
2843
|
use parent 'HTTP::Request'; |
|
7
|
|
|
|
|
1800
|
|
|
7
|
|
|
|
|
31
|
|
6
|
7
|
|
|
7
|
|
136844
|
use Net::Azure::EventHubs::Response; |
|
7
|
|
|
|
|
22
|
|
|
7
|
|
|
|
|
221
|
|
7
|
7
|
|
|
7
|
|
37
|
use Carp; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
338
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
10
|
7
|
|
|
|
|
47
|
new => 0, |
11
|
|
|
|
|
|
|
rw => [qw[agent]], |
12
|
7
|
|
|
7
|
|
2611
|
); |
|
7
|
|
|
|
|
5401
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub do { |
15
|
4
|
|
|
4
|
1
|
28952
|
my $self = shift; |
16
|
4
|
|
|
|
|
39
|
my $res = $self->agent->request($self); |
17
|
4
|
100
|
|
|
|
2736253
|
croak $res->status_line if !$res->is_success; |
18
|
3
|
|
|
|
|
63
|
bless $res, 'Net::Azure::EventHubs::Response'; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding utf-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Net::Azure::EventHubs::Request - A Request Class for Net::Azure::EventHubs |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use Net::Azure::EventHubs::Request; |
32
|
|
|
|
|
|
|
use LWP::UserAgent; |
33
|
|
|
|
|
|
|
my $req = Net::Azure::EventHubs::Request->new(GET => 'http://...'); |
34
|
|
|
|
|
|
|
$req->agent(LWP::UserAgent->new); |
35
|
|
|
|
|
|
|
my $res = $req->do; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Net::Azure::EventHubs::Request is a request class for Net::Azure::EventHubs. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
It inherits HTTP::Request. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 new |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
A constructor method. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 agent |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $agent = LWP::UserAgent->new(...); |
52
|
|
|
|
|
|
|
$req->agent($agent); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
An accessor for setting/getting a LWP::UserAgent object |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 do |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $res = $req->do; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Do itself as http/https request with agent. Then returns a response object. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Copyright (C) ytnobody. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
67
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
ytnobody Eytnobody@gmail.comE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|