line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ArangoDB::Edge; |
2
|
8
|
|
|
8
|
|
48
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
313
|
|
3
|
8
|
|
|
8
|
|
42
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
223
|
|
4
|
8
|
|
|
8
|
|
46
|
use utf8; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
54
|
|
5
|
8
|
|
|
8
|
|
328
|
use 5.008001; |
|
8
|
|
|
|
|
29
|
|
|
8
|
|
|
|
|
394
|
|
6
|
8
|
|
|
8
|
|
54
|
use Carp qw(croak); |
|
8
|
|
|
|
|
25
|
|
|
8
|
|
|
|
|
544
|
|
7
|
8
|
|
|
8
|
|
51
|
use parent 'ArangoDB::AbstractDocument'; |
|
8
|
|
|
|
|
31
|
|
|
8
|
|
|
|
|
55
|
|
8
|
8
|
|
|
8
|
|
796
|
use ArangoDB::Constants qw(:api); |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
3483
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub from { |
11
|
0
|
|
|
0
|
1
|
|
return $_[0]->{_from}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub to { |
15
|
0
|
|
|
0
|
1
|
|
return $_[0]->{_to}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _api_path { |
19
|
0
|
|
|
0
|
|
|
my $self = shift; |
20
|
0
|
|
|
|
|
|
return API_EDGE . '/' . $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Handling server error |
24
|
|
|
|
|
|
|
sub _server_error_handler { |
25
|
0
|
|
|
0
|
|
|
my ( $self, $error, $action ) = @_; |
26
|
0
|
|
|
|
|
|
my $msg = sprintf( 'Failed to %s the edge(%s)', $action, $self ); |
27
|
0
|
0
|
0
|
|
|
|
if ( ref($error) && $error->isa('ArangoDB::ServerException') ) { |
28
|
0
|
|
0
|
|
|
|
$msg .= ':' . ( $error->detail->{errorMessage} || q{} ); |
29
|
|
|
|
|
|
|
} |
30
|
0
|
|
|
|
|
|
croak $msg; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |