Branch Coverage

blib/lib/POE/Component/Server/IRC/Backend.pm
Criterion Covered Total %
branch 99 216 45.8


line true false branch
41 0 182 if @_ & 1
46 0 182 if defined $args{'raw_events'}
49 0 182 defined $args{'prefix'} ? :
52 182 0 defined $args{'antiflood'} ? :
56 182 0 defined $args{'auth'} ? :
58 12 170 if ($args{'sslify_options'} and ref $args{'sslify_options'} eq 'ARRAY')
66 0 12 if $@
75 0 12 if $@
79 181 1 if ($args{'states'})
81 0 181 if defined $error
97 181 1 $args{'states'} ? :
182 0 $args{'plugin_debug'} ? :
0 182 ref $args{'options'} eq 'HASH' ? :
100 1 181 if ($self->{'auth'})
117 181 181 if (ref $events eq 'HASH') { }
181 0 elsif (ref $events eq 'ARRAY') { }
119 0 3982 if ({add_connector => '_add_connector', add_listener => '_add_listener', del_listener => '_del_listener', send_output => '_send_output', shutdown => '_shutdown', syndicator_started => '_start'}->{$event} or &first(sub { $event eq $_; } , @{['_accept_connection', '_accept_failed', '_conn_alarm', '_conn_input', '_conn_error', '_conn_flushed', '_event_dispatcher', '_sock_failed', '_sock_up', '_sock_ssl'];}))
127 0 724 if ({add_connector => '_add_connector', add_listener => '_add_listener', del_listener => '_del_listener', send_output => '_send_output', shutdown => '_shutdown', syndicator_started => '_start'}->{$event} or &first(sub { $event eq $_; } , @{['_accept_connection', '_accept_failed', '_conn_alarm', '_conn_input', '_conn_error', '_conn_flushed', '_event_dispatcher', '_sock_failed', '_sock_up', '_sock_ssl'];}))
157 0 0 if $value
211 15 13 if ($self->{'got_ssl'} and $listener->{'usessl'})
218 0 15 if $@
233 525 0 if ($wheel)
251 1 524 $listener->{'auth'} && $self->{'auth'} ? :
271 6 519 if (my $reason = $self->denied($peeraddr))
283 0 15 unless $cont->{'wheel_id'}
285 0 15 unless $self->{'wheels'}{$wheel_id}
287 0 15 unless $stat
290 15 0 if $sslinf
302 0 0 $version == 65279 ? :
0 0 $version == 2 ? :
0 0 $version == 768 ? :
0 0 $version == 769 ? :
0 0 $version == 770 ? :
29 0 $version == 771 ? :
317 0 174 if @_ & 1
334 10 168 if $args{'usessl'}
335 0 178 if defined $args{'auth'} and $args{'auth'} eq '0'
336 0 178 if defined $args{'antiflood'} and $args{'antiflood'} eq '0'
345 0 178 ip_is_ipv6($bindaddr) ? :
0 178 $args{'listenqueue'} ? :
359 178 0 if ($port)
374 0 10 if @_ & 1
387 0 10 if ($self->_listener_exists($listener_id)) { }
10 0 elsif (defined $port) { }
400 10 0 if ($listener->{'port'} == $port)
419 0 0 if defined $self->{'listeners'}{$listener_id}
425 0 3 if @_ & 1
439 0 3 unless $remoteaddress and $remoteport
449 0 3 $args{'bindaddress'} ? :
0 3 ip_is_ipv6($remoteaddress) ? :
453 3 0 if ($wheel)
480 1 0 if ($self->{'got_ssl'} and $cntr->{'usessl'})
486 0 1 if $@
501 0 3 unless $wheel
534 0 0 unless $wheel_id and $self->connection_exists($wheel_id) and $input
537 0 0 if ($self->{'wheels'}{$wheel_id}{'flooded'})
540 0 0 if (not $self->{'wheels'}{$wheel_id}{'timer'} or $self->{'wheels'}{$wheel_id}{'timer'} < $current_time)
548 0 0 if ($self->{'wheels'}{$wheel_id}{'timer'} <= $current_time + 10)
569 0 241 unless $self->connection_exists($wheel_id)
579 0 0 unless $self->connection_exists($wheel_id)
598 0 2797 unless $self->connection_exists($wheel_id)
607 246 2551 if ($self->{'wheels'}{$wheel_id}{'disconnecting'})
615 1 2550 if ($self->{'wheels'}{$wheel_id}{'compress_pending'})
631 1 3938 if $conn->{'disconnecting'}
638 0 3938 if ($self->{'raw_events'})
650 0 3938 if ($self->antiflood($wheel_id)) { }
663 0 0 if (not $self->connection_exists($wheel_id) or $self->{'wheels'}{$wheel_id}{'flooded'})
671 0 0 if ($input)
681 12472 229 if ($output and ref $output eq 'HASH')
683 0 9140 if ($self->{'raw_events'})
704 0 4480 unless $self->connection_exists($wheel_id)
705 4480 0 unless $self->{'antiflood'}
706 0 0 unless defined $value
708 0 0 unless ($value)
714 0 0 if ($input)
727 0 2 unless $self->connection_exists($wheel_id)
728 0 2 unless defined $value
730 2 0 if ($value) { }
731 2 0 unless ($self->{'got_zlib'})
737 0 2 unless $self->{'got_zlib'}
739 1 1 if ($cntr) { }
762 0 240 unless $wheel_id and $self->connection_exists($wheel_id)
769 0 487 unless $wheel_id and $self->connection_exists($wheel_id)
781 0 487 if ($^O =~ /(cygwin|MSWin)/)
791 0 0 unless $self->connection_exists($wheel_id)
799 79 17389 unless $wheel_id and defined $self->{'wheels'}{$wheel_id}
805 0 484 unless $wheel_id and defined $self->{'wheels'}{$wheel_id}
806 470 14 unless $self->{'wheels'}{$wheel_id}{'secured'}
808 14 0 unless ($sslinfo)
811 14 0 if $sslinfo
819 0 12 unless $wheel_id and defined $self->{'wheels'}{$wheel_id}
820 0 12 unless $self->{'wheels'}{$wheel_id}{'secured'}
827 9 3 if $fp
833 0 0 unless $wheel_id and defined $self->{'wheels'}{$wheel_id}
839 0 2 unless $wheel_id and defined $self->{'wheels'}{$wheel_id}
846 0 0 unless $self->connection_exists($conn_id)
855 6 0 unless (eval { do { $netmask->isa('Net::Netmask') } })
859 0 6 unless ($netmask)
874 0 5 unless $self->{'denials'}{$netmask}
883 0 0 unless ($netmask->isa('Net::Netmask'))
887 0 0 unless ($netmask)
892 0 0 unless ($self->{'exemptions'}{$netmask})
901 0 0 unless $self->{'exemptions'}{$netmask}
909 0 537 if $self->exempted($ipaddr)
912 0 11 if (eval { do { $self->{'denials'}{$mask}{'blk'}->isa('Net::Netmask') } } and $self->{'denials'}{$mask}{'blk'}->match($ipaddr)) { }
11 0 elsif (Net::CIDR::cidrlookup($ipaddr, $self->{'denials'}{$mask}{'blk'})) { }
927 0 0 if $self->{'exemptions'}{$mask}->isa('Net::Netmask') and $self->{'exemptions'}{$mask}->match($ipaddr)
928 0 0 if Net::CIDR::cidrlookup($ipaddr, $self->{'exemptions'}{$mask})