MooseFS/Exports.pm

filter: Statementstmt 41.6% 15 / 36 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 37.2% 19 / 51 CC 5 SCAR 27.5
CC
5
Cov
34%
BUILD
30.0
__ANON__
2.0
BEGIN
1.0
CRAP 15.6
« MooseFS.pm ↑ Summary MooseFS/ChunkInfo.pm »
1 package MooseFS::Exports;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use IO::Socket::INET;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 extends 'MooseFS';
8  
9 has list => (
10 is => 'rw',
11 0 ▶ default => sub { [] }
Subroutine __ANON__: not called CC=1 SCAR=6.9
12 1 );
13  
14 0 ▶sub BUILD {
Subroutine BUILD: not called CC=5 SCAR=34.0
Pod undocumented
15 0 my $self = shift;
16 0 my $s = $self->sock;
17 0 print $s pack('(LL)>', 520, 0);
18 0 my $header = $self->myrecv($s, 8);
19 0 my ($cmd, $length) = unpack('(LL)>', $header);
20 0 ▶ if ( $cmd == 521 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cmd == 521) 0 0 0
21 0 my $data = $self->myrecv($s, $length);
22 0 my $pos = 0;
23 0 ▶ while ( $pos < $length ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos < $length) 0 0 0
24 0 my ($fip1, $fip2, $fip3, $fip4, $tip1, $tip2, $tip3, $tip4, $pleng) = unpack("(CCCCCCCCL)>", substr($data, $pos, 12));
25 0 $pos += 12;
26 0 my $path = substr($data, $pos, $pleng);
27 0 $pos += $pleng;
28 0 my ($v1, $v2, $v3, $exportflags, $sesflags, $rootuid, $rootgid, $mapalluid, $mapallgid) = unpack("(SCCCCLLLL)>", substr($data, $pos, 22));
29 0 $pos += 22;
30  
31 0 ▶ if ( ($sesflags & 16) == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (($sesflags & 16) == 0) 0 0 0
32 0 $mapalluid = undef;
33 0 $mapallgid = undef;
34 };
35  
36 0 ▶ push @{$self->list}, {
Branch: 1 branch
BranchTrueFalseTotal
$path eq '.' ? : 0 0 0
37 ip_range_from => "$fip1.$fip2.$fip3.$fip4",
38 ip_range_to => "$tip1.$tip2.$tip3.$tip4",
39 path => $path,
40 meta => $path eq '.' ? 1 : 0,
41 version => "$v1.$v2.$v3",
42 export_flags => $exportflags,
43 ses_flags => $sesflags,
44 root_uid => $rootuid,
45 root_gid => $rootgid,
46 all_users_uid => $mapalluid,
47 all_users_gid => $mapallgid,
48 };
49 }
50 }
51 }
52  
53 1 1;
« MooseFS.pm ↑ Summary MooseFS/ChunkInfo.pm »