Branch Coverage

blib/lib/Net/Hotline/Client.pm
Criterion Covered Total %
branch 0 442 0.0


line true false branch
87 0 0 $^O eq 'MacOS' ? :
179 0 0 unless @_ == 2
181 0 0 if (ref $$self{'SERVER'} and $$self{'SERVER'}->opened)
186 0 0 $blocking ? :
193 0 0 $arg ? :
0 0 if @_ == 2
200 0 0 if $secs =~ /^\d+$/
207 0 0 $arg ? :
0 0 if @_ == 2
214 0 0 if -d $dir
221 0 0 if $ext eq $$self{'DATA_FORK_EXT'}
223 0 0 if defined $ext
231 0 0 if (defined $secs)
233 0 0 if $secs =~ /[^0-9.]/
246 0 0 $arg ? :
0 0 if @_ == 2
256 0 0 if $size =~ /^\d+$/
271 0 0 if $separator =~ /^.$/
278 0 0 if $ext eq $$self{'RSRC_FORK_EXT'}
280 0 0 if defined $ext
289 0 0 $_[0]{'SERVER_ADDR'} . ($_[0]{'SERVER_PORT'} ne 5500) ? :
300 0 0 if (($address = $server) =~ s/^([^ :]+)(?:[: ](\d+))?$/$1/) { }
323 0 0 if ($@ =~ /timeout/)
329 0 0 if (not $$self{'SERVER'} or $@)
347 0 0 if (ref $$self{'SERVER'} and $$self{'SERVER'}->opened)
363 0 0 if ($$self{'BLOCKING_TASKS'}) { }
387 0 0 unless $task_num
391 0 0 if ($task->error)
398 0 0 unless ($no_news)
400 0 0 unless ($self->get_news)
407 0 0 unless ($no_userlist)
409 0 0 unless ($self->get_userlist)
426 0 0 unless $server = $$self{'SERVER'}
428 0 0 unless ($server->opened)
443 0 0 unless _hlc_write($self, $server, \"TRTPHOTL\000\cA\000\cB", 12)
444 0 0 unless _hlc_read($self, $server, \$response, 8)
446 0 0 if ($response ne "TRTP\000\000\000\000")
492 0 0 if (_hlc_write($self, $server, \$data, length $data)) { }
500 0 0 unless ($args{'NoUserList'})
505 0 0 unless ($args{'NoNews'})
519 0 0 unless my($server) = $$self{'SERVER'}
520 0 0 unless $server->opened
528 0 0 unless _process_packet($self, $packet, $ret)
544 0 0 if ($ret == 2)
546 0 0 if (defined $$self{'HANDLERS'}{'EVENT'})
557 0 0 if (defined $$self{'HANDLERS'}{'EVENT'})
564 0 0 if ($type == 302) { }
0 0 elsif ($type == 65536) { }
0 0 elsif ($type == 109) { }
0 0 elsif ($type == 104) { }
0 0 elsif ($type == 301) { }
0 0 elsif ($type == 106) { }
0 0 elsif ($type == 102) { }
0 0 elsif ($type == 111 or $type eq 'DISCONNECTED') { }
0 0 elsif ($type == 113) { }
0 0 elsif ($type == 117) { }
0 0 elsif ($type == 118) { }
0 0 elsif ($type == 119) { }
570 0 0 if (defined $$packet{'SOCKET'} and defined $$self{'USER_LIST'}{$$packet{'SOCKET'}})
577 0 0 if ($use_handlers)
579 0 0 if (defined $$self{'HANDLERS'}{'LEAVE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
598 0 0 if (defined $$packet{'TASK_ERROR'}) { }
603 0 0 if ($use_handlers)
605 0 0 if (defined $$self{'HANDLERS'}{'TASK_ERROR'}) { }
620 0 0 if ($task_type == 15 and defined $$packet{'USER_LIST'}) { }
0 0 elsif ($task_type == 4) { }
0 0 elsif ($task_type == 10 and defined $$packet{'DATA'}) { }
0 0 elsif ($task_type == 14 and defined $$packet{'DATA'}) { }
0 0 elsif ($task_type == 3) { }
0 0 elsif ($task_type == 9) { }
0 0 elsif ($task_type == 11) { }
0 0 elsif ($task_type == 12) { }
0 0 elsif ($task_type == 8) { }
0 0 elsif ($task_type == 18) { }
0 0 elsif ($task_type == 13) { }
0 0 elsif ($task_type == 1) { }
0 0 elsif ($task_type == 5) { }
0 0 elsif ($task_type == 6) { }
0 0 elsif ($task_type == 2) { }
0 0 elsif ($task_type == 7) { }
0 0 elsif ($task_type == 16) { }
0 0 elsif ($task_type == 17) { }
624 0 0 if ($use_handlers)
626 0 0 if (defined $$self{'HANDLERS'}{'USER_LIST'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
640 0 0 unless length $task->path
643 0 0 if ($$packet{'FILE_LIST'}) { }
652 0 0 if ($use_handlers)
654 0 0 if (defined $$self{'HANDLERS'}{'FILE_LIST'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
670 0 0 if ($use_handlers)
672 0 0 if (defined $$self{'HANDLERS'}{'NEWS'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
688 0 0 if ($use_handlers)
690 0 0 if (defined $$self{'HANDLERS'}{'USER_GETINFO'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
707 0 0 unless length $task->path
721 0 0 if ($use_handlers)
723 0 0 if (defined $$self{'HANDLERS'}{'FILE_GET_INFO'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
737 0 0 if ($use_handlers)
739 0 0 if (defined $$self{'HANDLERS'}{'LOGIN'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
751 0 0 if ($use_handlers)
753 0 0 if (defined $$self{'HANDLERS'}{'NEWS_POST'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
765 0 0 if ($use_handlers)
767 0 0 if (defined $$self{'HANDLERS'}{'SEND_MSG'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
779 0 0 if ($use_handlers)
781 0 0 if (defined $$self{'HANDLERS'}{'KICK'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
793 0 0 if ($use_handlers)
795 0 0 if (defined $$self{'HANDLERS'}{'BAN'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
807 0 0 if ($use_handlers)
809 0 0 if (defined $$self{'HANDLERS'}{'FILE_SET_INFO'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
821 0 0 if ($use_handlers)
823 0 0 if (defined $$self{'HANDLERS'}{'FILE_DELETE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
835 0 0 if ($use_handlers)
837 0 0 if (defined $$self{'HANDLERS'}{'FILE_MKDIR'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
849 0 0 if ($use_handlers)
851 0 0 if (defined $$self{'HANDLERS'}{'FILE_MOVE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
866 0 0 if ($use_handlers)
868 0 0 if (defined $$self{'HANDLERS'}{'FILE_GET'}) { }
874 0 0 if $$self{'DEFAULT_HANDLERS'}
887 0 0 if ($use_handlers)
889 0 0 if (defined $$self{'HANDLERS'}{'FILE_PUT'}) { }
895 0 0 if $$self{'DEFAULT_HANDLERS'}
911 0 0 if ($use_handlers)
913 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_CREATE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
939 0 0 if ($use_handlers)
941 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_ACCEPT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
959 0 0 if (defined $$packet{'DATA'})
961 0 0 if ($use_handlers)
963 0 0 if (defined $$self{'HANDLERS'}{'AGREEMENT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
979 0 0 if (defined $user and defined $$packet{'DATA'}) { }
0 0 elsif (defined $$packet{'DATA'}) { }
981 0 0 if ($use_handlers)
983 0 0 if (defined $$self{'HANDLERS'}{'MSG'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
993 0 0 if ($$packet{'IS_REPLY'})
1004 0 0 if ($use_handlers)
1006 0 0 if (defined $$self{'HANDLERS'}{'SERVER_MSG'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1019 0 0 if (defined $$packet{'NICK'} and defined $$packet{'SOCKET'} and defined $$packet{'ICON'} and defined $$packet{'COLOR'})
1022 0 0 if (defined $$self{'USER_LIST'}{$$packet{'SOCKET'}}) { }
1026 0 0 if ($user->nick ne $$packet{'NICK'}) { }
0 0 elsif ($user->icon ne $$packet{'ICON'}) { }
0 0 elsif ($user->color ne $$packet{'COLOR'}) { }
1032 0 0 if ($use_handlers)
1034 0 0 if (defined $$self{'HANDLERS'}{'NICK'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1050 0 0 if ($use_handlers)
1052 0 0 if (defined $$self{'HANDLERS'}{'ICON'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1070 0 0 if ($use_handlers)
1072 0 0 if (defined $$self{'HANDLERS'}{'COLOR'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1094 0 0 if ($use_handlers)
1096 0 0 if (defined $$self{'HANDLERS'}{'JOIN'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1114 0 0 if (defined $$packet{'DATA'})
1120 0 0 if ($ref) { }
1123 0 0 if ($$packet{'DATA'} =~ /^ \*\*\* /) { }
1125 0 0 if ($use_handlers)
1127 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_ACTION'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1139 0 0 if ($use_handlers)
1141 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_CHAT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1155 0 0 if ($$packet{'DATA'} =~ /^ \*\*\* /) { }
1157 0 0 if ($use_handlers)
1159 0 0 if (defined $$self{'HANDLERS'}{'CHAT_ACTION'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1171 0 0 if ($use_handlers)
1173 0 0 if (defined $$self{'HANDLERS'}{'CHAT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1190 0 0 if (defined $post)
1195 0 0 if ($use_handlers)
1197 0 0 if (defined $$self{'HANDLERS'}{'NEWS_POSTED'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1211 0 0 if (defined $$packet{'DATA'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1213 0 0 if ($use_handlers)
1215 0 0 if (defined $$self{'HANDLERS'}{'QUIT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1227 0 0 if ($use_handlers)
1238 0 0 if ($use_handlers)
1240 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_INVITE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1261 0 0 if ($use_handlers)
1263 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_JOIN'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1281 0 0 if ($use_handlers)
1283 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_LEAVE'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1299 0 0 if ($use_handlers)
1301 0 0 if (defined $$self{'HANDLERS'}{'PCHAT_SUBJECT'}) { }
0 0 elsif ($$self{'DEFAULT_HANDLERS'}) { }
1319 0 0 if (defined $code_ref)
1321 0 0 if (ref $code_ref eq 'CODE')
1384 0 0 if (@_ == 1 and not ref $_[0]) { }
0 0 elsif (@_ == 2 and ref $_[0] eq 'Net::Hotline::Client') { }
1386 0 0 $_[0] ? :
1390 0 0 $_[1] ? :
1400 0 0 if $len == 0 or not defined $len
1402 0 0 unless (_write($fh, $data_ref, $len) == $len)
1415 0 0 if $len == 0 or not defined $len
1417 0 0 unless (_read($fh, $data_ref, $len) == $len)
1430 0 0 if $len == 0 or not defined $len
1432 0 0 unless (read($fh, $$data_ref, $len) == $len)
1445 0 0 if ref $_[0]