Branch Coverage

blib/lib/Net/LPR.pm
Criterion Covered Total %
branch 0 504 0.0


line true false branch
36 0 0 unless exists $valid_options{$k}
71 0 0 if $$self{'PrintErrors'}
72 0 0 if $$self{'RaiseErrors'}
77 0 0 if @_ != 1
86 0 0 if @_ != 1
99 0 0 if @_ != 1
103 0 0 if ($self->connected)
109 0 0 if ($$self{'StrictRFCPorts'}) { }
119 0 0 if defined $sock
120 0 0 unless $! =~ /in use|bad file number/i
122 0 0 unless (defined $sock)
123 0 0 if ($!) { }
137 0 0 unless (defined $sock)
153 0 0 if @_ != 1
157 0 0 if defined $$self{'Socket'} and not $$self{'Socket'}->opened
166 0 0 if @_ != 2
170 0 0 unless ($self->connected)
175 0 0 unless ($$self{'Mode'} == 1)
184 0 0 unless ($$self{'Socket'}->print("\cA$queue\n"))
188 0 0 unless ($$self{'Socket'}->flush)
198 0 0 if @_ != 2
201 0 0 unless ($self->connected)
206 0 0 unless ($$self{'Mode'} == 1)
215 0 0 unless ($$self{'Socket'}->print("\cB$queue\n"))
220 0 0 unless ($$self{'Socket'}->flush)
229 0 0 if (length $result) { }
236 0 0 if ($result != 0)
248 0 0 if @_ < 2
252 0 0 unless ($self->connected)
257 0 0 unless ($$self{'Mode'} == 1)
268 0 0 $longflag ? :
270 0 0 unless ($$self{'Socket'}->print("$cmd$queue "))
281 0 0 unless ($$self{'Socket'}->print("$item "))
287 0 0 unless ($$self{'Socket'}->print("\n"))
292 0 0 unless ($$self{'Socket'}->flush)
309 0 0 if @_ < 3
313 0 0 unless ($self->connected)
318 0 0 unless ($$self{'Mode'} == 1)
329 0 0 unless ($$self{'Socket'}->print("\cE$queue $username"))
340 0 0 unless ($$self{'Socket'}->print(" $item"))
346 0 0 unless ($$self{'Socket'}->print("\n"))
351 0 0 unless ($$self{'Socket'}->flush)
365 0 0 if @_ != 1
369 0 0 unless ($self->connected)
374 0 0 unless ($$self{'Mode'} == 2)
381 0 0 unless ($$self{'Socket'}->print("\cA\n"))
386 0 0 unless ($$self{'Socket'}->flush)
395 0 0 if (length $result) { }
402 0 0 if ($result != 0)
414 0 0 if @_ < 1 or @_ > 3
419 0 0 unless defined $jobid
421 0 0 if (not $jobid =~ /^\d+$/ or $jobid > 999)
430 0 0 unless defined $jobname
436 0 0 if (exists $$self{'Jobs'}{$jobkey})
443 0 0 if ($^O eq 'MSWin32') { }
471 0 0 unless @_ == 2
476 0 0 unless (exists $$self{'Jobs'}{$jobkey})
486 0 0 unless @_ == 3
491 0 0 unless (exists $$self{'Jobs'}{$jobkey})
496 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
501 0 0 if ($$self{'Jobs'}{$jobkey}{'SentData'})
506 0 0 if ($$self{'Jobs'}{$jobkey}{'UsedDataFileName'})
515 0 0 if (length $text < 1)
527 0 0 unless @_ == 2
532 0 0 unless (exists $$self{'Jobs'}{$jobkey})
542 0 0 unless @_ == 3
547 0 0 unless (exists $$self{'Jobs'}{$jobkey})
552 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
557 0 0 if ($$self{'Jobs'}{$jobkey}{'UsedDataFileName'})
566 0 0 if (length $text < 1)
578 0 0 unless @_ == 3
583 0 0 unless (exists $$self{'Jobs'}{$jobkey})
588 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
597 0 0 unless (length $text < 32)
602 0 0 unless (length $text > 0)
614 0 0 unless @_ == 3
620 0 0 unless (exists $$self{'Jobs'}{$jobkey})
625 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
634 0 0 unless (length $text < 32)
646 0 0 unless @_ == 3
652 0 0 unless (exists $$self{'Jobs'}{$jobkey})
657 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
666 0 0 unless (length $text < 100)
671 0 0 unless (length $text > 0)
683 0 0 unless @_ == 3
689 0 0 unless (exists $$self{'Jobs'}{$jobkey})
694 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
703 0 0 unless (length $text < 32)
708 0 0 unless (length $text > 0)
720 0 0 unless @_ == 3
726 0 0 unless (exists $$self{'Jobs'}{$jobkey})
731 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
740 0 0 unless (length $text < 32)
745 0 0 unless (length $text > 0)
757 0 0 unless @_ == 3
763 0 0 unless (exists $$self{'Jobs'}{$jobkey})
768 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
777 0 0 unless (length $text < 132)
782 0 0 unless (length $text > 0)
794 0 0 unless @_ == 3
800 0 0 unless (exists $$self{'Jobs'}{$jobkey})
805 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
814 0 0 unless (length $text < 32)
819 0 0 unless (length $text > 0)
831 0 0 unless @_ == 4
837 0 0 unless (exists $$self{'Jobs'}{$jobkey})
842 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
850 0 0 unless ($dev =~ /^\d+$/ and $inode =~ /^\d+$/)
862 0 0 unless @_ == 2
868 0 0 unless (exists $$self{'Jobs'}{$jobkey})
873 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
887 0 0 unless @_ == 3
893 0 0 unless (exists $$self{'Jobs'}{$jobkey})
898 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
907 0 0 unless (length $text < 256)
912 0 0 unless (length $text > 0)
924 0 0 unless @_ == 3
930 0 0 unless (exists $$self{'Jobs'}{$jobkey})
935 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
944 0 0 unless (length $text < 256)
949 0 0 unless (length $text > 0)
961 0 0 unless @_ == 3
967 0 0 unless (exists $$self{'Jobs'}{$jobkey})
972 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
981 0 0 unless (length $text < 256)
986 0 0 unless (length $text > 0)
998 0 0 unless @_ == 3
1004 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1009 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1018 0 0 unless (length $text < 256)
1023 0 0 unless (length $text > 0)
1035 0 0 unless @_ == 2
1041 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1046 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1057 0 0 if (defined $f and length $f)
1058 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1059 0 0 if $f eq 'p'
1060 0 0 if $f eq 'f' or $f eq 'l'
1073 0 0 unless @_ == 2
1079 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1084 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1095 0 0 if (defined $f and length $f)
1096 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1097 0 0 if $f eq 'p'
1098 0 0 if $f eq 'f' or $f eq 'l'
1111 0 0 unless @_ >= 2 and @_ <= 5
1117 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1122 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1129 0 0 if (defined $width and not $width =~ /^\d+$/)
1136 0 0 if (defined $indentation and not $indentation =~ /^\d+$/)
1149 0 0 if (defined $f and length $f)
1150 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1151 0 0 if $f eq 'p'
1152 0 0 if $f eq 'f' or $f eq 'l'
1156 0 0 if (defined $nofilter and $nofilter) { }
1165 0 0 if defined $width
1166 0 0 if defined $indentation
1173 0 0 unless @_ == 2
1179 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1184 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1195 0 0 if (defined $f and length $f)
1196 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1197 0 0 if $f eq 'p'
1198 0 0 if $f eq 'f'
1211 0 0 unless @_ == 2
1217 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1222 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1233 0 0 if (defined $f and length $f)
1234 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1235 0 0 if $f eq 'p'
1236 0 0 if $f eq 'f' or $f eq 'l'
1249 0 0 unless @_ == 2
1255 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1260 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1271 0 0 if (defined $f and length $f)
1272 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1273 0 0 if $f eq 'p'
1274 0 0 if $f eq 'f' or $f eq 'l'
1287 0 0 unless @_ >= 2 and @_ <= 4
1293 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1298 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1305 0 0 if (defined $title)
1307 0 0 if (length $title < 0)
1311 0 0 if (length $title > 79)
1318 0 0 if (defined $width and not $width =~ /^\d+$/)
1329 0 0 if (defined $f and length $f)
1330 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1331 0 0 if $f eq 'p'
1332 0 0 if $f eq 'f' or $f eq 'l'
1339 0 0 if defined $title
1340 0 0 if defined $width
1347 0 0 unless @_ == 2
1353 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1358 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1369 0 0 if (defined $f and length $f)
1370 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1371 0 0 if $f eq 'p'
1372 0 0 if $f eq 'f' or $f eq 'l'
1385 0 0 unless @_ == 2
1391 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1396 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1407 0 0 if (defined $f and length $f)
1408 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1409 0 0 if $f eq 'p'
1410 0 0 if $f eq 'f' or $f eq 'l'
1423 0 0 unless @_ == 2
1429 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1434 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1445 0 0 if (defined $f and length $f)
1446 0 0 if $f eq 'f' or $f eq 'l' or $f eq 'p'
1447 0 0 if $f eq 'p'
1448 0 0 if $f eq 'f' or $f eq 'l'
1461 0 0 unless @_ == 2
1467 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1472 0 0 if ($$self{'Jobs'}{$jobkey}{'SentControl'})
1477 0 0 unless ($$self{'Mode'} == 2)
1489 0 0 unless exists $$self{'Jobs'}{$jobkey}{'CE'}{$k}
1493 0 0 unless ($$self{'Socket'}->print("\cB" . length($cf) . ' ' . $$self{'Jobs'}{$jobkey}{'ControlFileName'} . "\n"))
1498 0 0 unless ($$self{'Socket'}->flush)
1505 0 0 if (length $result) { }
1512 0 0 if ($result != 0)
1517 0 0 unless ($$self{'Socket'}->print("$cf\000"))
1522 0 0 unless ($$self{'Socket'}->flush)
1529 0 0 if (length $result) { }
1536 0 0 if ($result != 0)
1546 0 0 unless @_ >= 1
1550 0 0 if ($$self{'Mode'} == 2) { }
0 0 elsif ($$self{'Mode'} == 3) { }
1551 0 0 unless @_ >= 2 and @_ <= 3
1553 0 0 unless @_ == 2
1560 0 0 unless (exists $$self{'Jobs'}{$jobkey})
1565 0 0 if ($$self{'Jobs'}{$jobkey}{'SentData'})
1574 0 0 if (defined $totalsize and not $totalsize =~ /^\d+$/)
1579 0 0 if ($$self{'Mode'} == 2)
1581 0 0 if (defined $totalsize) { }
1582 0 0 unless ($$self{'Socket'}->print("\cC$totalsize " . $$self{'Jobs'}{$jobkey}{'DataFileName'} . "\n"))
1587 0 0 unless ($$self{'Socket'}->print("\cC " . $$self{'Jobs'}{$jobkey}{'DataFileName'} . "\n"))
1593 0 0 unless ($$self{'Socket'}->flush)
1602 0 0 if (defined $result and length $result) { }
1609 0 0 if ($result != 0)
1614 0 0 if defined $totalsize
1619 0 0 if ($$self{'Mode'} != 3)
1628 0 0 if ($$job{'DataSize'} > 0 and $dsize + $$job{'DataSent'} > $$job{'DataSize'})
1632 0 0 if (length $data > 0)
1633 0 0 unless ($$self{'Socket'}->print($data))
1641 0 0 if ($$job{'DataSent'} >= $$job{'DataSize'})
1645 0 0 if ($$job{'SentControl'})
1649 0 0 unless ($$self{'Socket'}->print("\000"))
1654 0 0 unless ($$self{'Socket'}->flush)
1663 0 0 if (length $result) { }
1670 0 0 if ($result != 0)
1676 0 0 if ($dsize != length $data)