| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package ArangoDB2::HTTP; |
|
2
|
|
|
|
|
|
|
|
|
3
|
20
|
|
|
20
|
|
81
|
use strict; |
|
|
20
|
|
|
|
|
25
|
|
|
|
20
|
|
|
|
|
612
|
|
|
4
|
20
|
|
|
20
|
|
78
|
use warnings; |
|
|
20
|
|
|
|
|
22
|
|
|
|
20
|
|
|
|
|
408
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
6815
|
use ArangoDB2::HTTP::LWP; |
|
|
20
|
|
|
|
|
52
|
|
|
|
20
|
|
|
|
|
2265
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# new |
|
11
|
|
|
|
|
|
|
# |
|
12
|
|
|
|
|
|
|
# create new ArangoDB2::HTTP instance which will always be |
|
13
|
|
|
|
|
|
|
# one of the sub-classes of ArangoDB2::HTTP which implements |
|
14
|
|
|
|
|
|
|
# a particular HTTP client |
|
15
|
|
|
|
|
|
|
sub new |
|
16
|
|
|
|
|
|
|
{ |
|
17
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
|
18
|
|
|
|
|
|
|
# for now use LWP client |
|
19
|
1
|
|
|
|
|
10
|
return ArangoDB2::HTTP::LWP->new(@_); |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# arango |
|
23
|
|
|
|
|
|
|
# |
|
24
|
|
|
|
|
|
|
# ArangoDB2 instance |
|
25
|
1
|
|
|
1
|
1
|
7
|
sub arango { $_[0]->{arango} } |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# error |
|
28
|
|
|
|
|
|
|
# |
|
29
|
|
|
|
|
|
|
# get/set last error (HTTP status) code |
|
30
|
|
|
|
|
|
|
sub error |
|
31
|
|
|
|
|
|
|
{ |
|
32
|
0
|
|
|
0
|
1
|
|
my($self, $error) = @_; |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
$self->{error} = $error |
|
35
|
|
|
|
|
|
|
if defined $error; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $self->{error}; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |