line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Azure::EventHubs::Request; |
2
|
7
|
|
|
7
|
|
139634
|
use strict; |
|
7
|
|
|
|
|
31
|
|
|
7
|
|
|
|
|
193
|
|
3
|
7
|
|
|
7
|
|
36
|
use warnings; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
197
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
3025
|
use parent 'HTTP::Request'; |
|
7
|
|
|
|
|
2161
|
|
|
7
|
|
|
|
|
38
|
|
6
|
7
|
|
|
7
|
|
163017
|
use Net::Azure::EventHubs::Response; |
|
7
|
|
|
|
|
25
|
|
|
7
|
|
|
|
|
254
|
|
7
|
7
|
|
|
7
|
|
47
|
use Carp; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
422
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
10
|
7
|
|
|
|
|
63
|
new => 0, |
11
|
|
|
|
|
|
|
rw => [qw[agent]], |
12
|
7
|
|
|
7
|
|
3013
|
); |
|
7
|
|
|
|
|
6555
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub do { |
15
|
4
|
|
|
4
|
1
|
35130
|
my $self = shift; |
16
|
4
|
|
|
|
|
45
|
my $res = $self->agent->request($self); |
17
|
4
|
100
|
|
|
|
3222607
|
croak $res->status_line if !$res->is_success; |
18
|
3
|
|
|
|
|
103
|
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
|
|
|
|
|
|
|
|