Branch Coverage

blib/lib/POE/Component/IRC/Plugin/Logger.pm
Criterion Covered Total %
branch 46 84 54.7


line true false branch
18 0 5 if @_ & 1
21 0 5 if (not defined $self{'Path'} and ref $self{'Log_sub'} ne "CODE")
30 0 5 unless ($irc->isa("POE::Component::IRC::State"))
34 5 0 unless (grep {$_->isa("POE::Component::IRC::Plugin::BotTraffic");} values %{$irc->plugin_list;})
38 0 5 if ($self->{'Restricted'}) { }
48 4 1 if ref $self->{'Log_sub'} ne "CODE"
49 0 5 if (defined $self->{'Path'} and not -d $self->{'Path'})
51 0 0 unless mkdir $self->{'Path'}, $self->{'dir_perm'}
57 5 0 unless defined $self->{'Private'}
58 5 0 unless defined $self->{'Public'}
59 5 0 unless defined $self->{'DCC'}
60 5 0 unless defined $self->{'Format'}
85 0 0 unless $irc->channel_list($chan)
95 0 0 unless $irc->channel_list($chan)
105 6 6 defined $_[3] ? :
118 1 0 if ($recipient eq $irc->nick_name) { }
136 1 1 if ($target eq $irc->nick_name) { }
241 1 0 ref $_[2] eq 'SCALAR' ? :
291 0 1 if $type ne "CHAT"
301 1 1 if (my($action) = $msg =~ /\001ACTION (.*?)\001/) { }
323 1 1 if (my($action) = $msg =~ /\001ACTION (.*?)\001/) { }
340 0 1 if $type ne "CHAT"
349 0 35 unless $self->{'irc'}->isupport("CHANTYPES")
351 23 12 if ($context =~ /^[$chantypes]/) { }
6 6 elsif ($context =~ /^=/) { }
352 0 23 unless $self->{'Public'}
355 0 6 unless $self->{'DCC'}
358 0 6 unless $self->{'Private'}
361 0 35 if $type eq "notice" and not $self->{'Notices'}
363 3 32 if (ref $self->{'Log_sub'} eq "CODE")
368 0 32 unless defined $self->{'Format'}{$type}
374 0 32 if ($self->{'Sort_by_date'}) { }
376 0 0 unless (-d $log_dir)
378 0 0 unless mkdir $log_dir, $self->{'dir_perm'}
388 3 29 unless ($self->{'logging'}{$context})
393 32 0 unless $self->{'Sort_by_date'}
401 0 32 unless sysopen my $log, $file_name, 1089, $self->{'file_perm'}
410 0 16 if $self->{'Strip_color'}
411 0 16 if $self->{'Strip_formatting'}
457 1 0 if $msg ne ""
463 1 0 if $msg ne ""
469 1 0 if $msg ne ""