line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CogBase::Node; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use CogBase::Base -base; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
810
|
use Data::UUID; |
|
1
|
|
|
|
|
2570
|
|
|
1
|
|
|
|
|
97
|
|
6
|
1
|
|
|
1
|
|
9
|
use Digest::MD5; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
7
|
1
|
|
|
1
|
|
843
|
use Convert::Base32; |
|
1
|
|
|
|
|
1291
|
|
|
1
|
|
|
|
|
240
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
field '_connection'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
field 'Id'; |
12
|
|
|
|
|
|
|
field 'Type'; |
13
|
|
|
|
|
|
|
field 'Owner'; |
14
|
|
|
|
|
|
|
field 'Group'; |
15
|
|
|
|
|
|
|
field 'Perms'; |
16
|
|
|
|
|
|
|
field 'Revision'; |
17
|
|
|
|
|
|
|
field 'Hid'; |
18
|
|
|
|
|
|
|
field 'Tags' => []; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _initialize { |
21
|
1
|
|
|
1
|
|
3
|
my $self = shift; |
22
|
1
|
50
|
|
|
|
24
|
if (my $type = $self->Type) { |
23
|
1
|
|
|
|
|
15
|
bless $self, "CogBase::$type"; |
24
|
|
|
|
|
|
|
} |
25
|
1
|
|
|
|
|
34
|
my $id = $self->Id; |
26
|
1
|
50
|
33
|
|
|
16
|
if ($id and $id =~ s/-0*(\d+)$//) { |
27
|
0
|
|
|
|
|
0
|
$self->Id($id); |
28
|
0
|
|
|
|
|
0
|
$self->Revision($1); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _fields { |
33
|
1
|
|
|
1
|
|
22
|
my $self = shift; |
34
|
1
|
|
|
|
|
12
|
return grep !/^[A-Z_]/, keys %$self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |