| line |
true |
false |
branch |
|
30
|
2 |
1 |
if (exists $p{'filehandle'}) { } |
|
55
|
0 |
1 |
if ($$self{'device'} =~ m([/\\])) { } |
|
58
|
1 |
0 |
if ($$self{'device'} eq 'discover') |
|
73
|
1 |
0 |
if ($dev =~ s/:(\d+)$//) |
|
76
|
0 |
1 |
unless my $fh = 'IO::Socket::INET'->new($dev . ':' . $self->port) |
|
87
|
0 |
0 |
if $@ |
|
90
|
0 |
0 |
unless my $sport = tie(*$fh, 'Device::SerialPort', $dev) |
|
99
|
0 |
0 |
unless sysopen $fh, $dev, 2306 |
|
109
|
2 |
2 |
if defined $res |
|
110
|
2 |
2 |
if defined $res |
|
115
|
0 |
2 |
unless $sel->can_read($timeout) |
|
118
|
0 |
2 |
if defined $timeout |
|
119
|
1 |
0 |
defined $bytes ? : |
|
|
1 |
1 |
unless $bytes |
|
121
|
1 |
0 |
if defined $res |
|
122
|
1 |
0 |
if defined $res |
|
129
|
2 |
4 |
unless $$rbuf |
|
133
|
2 |
2 |
if ($$self{'type'} eq 'eISCP') { } |
|
135
|
0 |
2 |
unless $length >= 16 |
|
138
|
0 |
2 |
unless $magic eq 'ISCP' |
|
140
|
0 |
2 |
unless $length >= $header_size + $data_size |
|
142
|
0 |
2 |
unless $version == 1 |
|
144
|
0 |
2 |
unless $header_size == 16 |
|
149
|
0 |
2 |
unless $sd eq '!1' |
|
153
|
0 |
2 |
unless $$rbuf =~ s/^(..)(....*?)[\032\r\n]+// |
|
155
|
0 |
2 |
unless $sd eq '!1' |
|
182
|
0 |
1 |
unless $sel->can_read(10) |
|
184
|
0 |
1 |
unless defined $sender |
|
201
|
1 |
0 |
unless $$self{'_waiting'} |
|
209
|
0 |
4 |
if ($wait_rec and $$wait_rec[1]) |
|
211
|
0 |
0 |
if $cb |
|
213
|
3 |
1 |
unless defined $rec |
|
228
|
1 |
0 |
if ($$self{'type'} eq 'eISCP') { } |
|
360
|
7 |
3 |
if (defined $str) { } |
|
|
2 |
1 |
elsif ($canon =~ /^vol(100|[0-9][0-9]?)%?$/) { } |
|
|
0 |
1 |
elsif ($canon =~ /^sleep(90|[0-8][0-9]|[1-9])m\w+?$/) { } |
|
|
1 |
0 |
elsif (not $cmd =~ /^[A-Z][A-Z][A-Z]/) { } |