Branch Coverage

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


line true false branch
19 0 5 if @_ & 1
22 0 5 if (not defined $self{'Path'} and ref $self{'Log_sub'} ne 'CODE')
31 0 5 unless ($irc->isa('POE::Component::IRC::State'))
35 5 0 unless (grep {$_->isa('POE::Component::IRC::Plugin::BotTraffic');} values %{$irc->plugin_list;})
39 0 5 if ($self->{'Restricted'}) { }
49 4 1 if ref $self->{'Log_sub'} ne 'CODE'
50 0 5 if (defined $self->{'Path'} and not -d $self->{'Path'})
52 0 0 unless mkdir $self->{'Path'}, $self->{'dir_perm'}
58 5 0 unless defined $self->{'Private'}
59 5 0 unless defined $self->{'Public'}
60 5 0 unless defined $self->{'DCC'}
61 5 0 unless defined $self->{'Format'}
86 0 0 unless $irc->channel_list($chan)
96 0 0 unless $irc->channel_list($chan)
106 6 6 defined $_[3] ? :
119 1 0 if ($recipient eq $irc->nick_name) { }
137 1 1 if ($target eq $irc->nick_name) { }
242 1 0 ref $_[2] eq 'SCALAR' ? :
292 0 1 if $type ne 'CHAT'
302 1 1 if (my($action) = $msg =~ /\001ACTION (.*?)\001/) { }
324 1 1 if (my($action) = $msg =~ /\001ACTION (.*?)\001/) { }
341 0 1 if $type ne 'CHAT'
350 0 35 unless $self->{'irc'}->isupport('CHANTYPES')
352 23 12 if ($context =~ /^[$chantypes]/) { }
6 6 elsif ($context =~ /^=/) { }
353 0 23 unless $self->{'Public'}
356 0 6 unless $self->{'DCC'}
359 0 6 unless $self->{'Private'}
362 0 35 if $type eq 'notice' and not $self->{'Notices'}
364 3 32 if (ref $self->{'Log_sub'} eq 'CODE')
369 0 32 unless defined $self->{'Format'}{$type}
375 0 32 if ($self->{'Sort_by_date'}) { }
377 0 0 unless (-d $log_dir)
379 0 0 unless mkdir $log_dir, $self->{'dir_perm'}
389 3 29 unless ($self->{'logging'}{$context})
394 32 0 unless $self->{'Sort_by_date'}
402 0 32 unless sysopen my $log, $file_name, 1089, $self->{'file_perm'}
411 0 16 if $self->{'Strip_color'}
412 0 16 if $self->{'Strip_formatting'}
458 1 0 if $msg ne ''
464 1 0 if $msg ne ''
470 1 0 if $msg ne ''