line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ArangoDB2::HTTP; |
2
|
|
|
|
|
|
|
|
3
|
20
|
|
|
20
|
|
83
|
use strict; |
|
20
|
|
|
|
|
26
|
|
|
20
|
|
|
|
|
648
|
|
4
|
20
|
|
|
20
|
|
101
|
use warnings; |
|
20
|
|
|
|
|
29
|
|
|
20
|
|
|
|
|
414
|
|
5
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
7086
|
use ArangoDB2::HTTP::LWP; |
|
20
|
|
|
|
|
47
|
|
|
20
|
|
|
|
|
2178
|
|
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
|
2
|
my $self = shift; |
18
|
|
|
|
|
|
|
# for now use LWP client |
19
|
1
|
|
|
|
|
7
|
return ArangoDB2::HTTP::LWP->new(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# arango |
23
|
|
|
|
|
|
|
# |
24
|
|
|
|
|
|
|
# ArangoDB2 instance |
25
|
0
|
|
|
0
|
1
|
|
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__ |