Branch Coverage

blib/lib/AnyEvent/eris/Server.pm
Criterion Covered Total %
branch 29 70 41.4


line true false branch
28 0 0 if $fatal
75 5 0 if --$self->{'programs'}{$program} <= 0
137 2 0 if --$self->{'words'}{$word} <= 0
168 0 1 if $self->clients->{$SID}{'full'}
173 1 0 if defined $args and length $args
176 0 1 unless (eval { do { $regex = qr/$args/ if defined $args and length $args; 1 } })
211 1 4 if $clients->{$SID}{$stream}
215 1 1 unless $self->{$assist}
2 3 if $assist = $_STREAM_ASSISTERS{$stream}
218 4 1 if $stream_count == 0
222 1 0 if $assist_count
239 0 0 unless $self->{$asst}
262 4 1 unless $clients->{$SID}{$stream}
267 0 1 ref $stream_data eq 'HASH' ? :
278 1 0 if (my $cb = $dispatch{$type}) { }
311 0 26 if ($client_streams)
312 0 0 if (my $assist = $_STREAM_ASSISTERS{$stream})
315 0 0 if --$self->{'assists'}{$assist}{$key} <= 0
348 0 10 unless my($fh) = @_
376 15 109 if (my($args) = $line =~ /$regex/i)
400 0 12 if $self->{'config'}{'GraphiteHost'}
413 0 2 unless @{$msgs;} > 0
433 0 0 unless (eval { do { $self->{'_graphite'} = 'AnyEvent::Graphite'->new('host', $self->{'config'}{'GraphiteHost'}, 'port', $self->{'config'}{'GraphitePort'}); 1 } })
442 11 0 unless (exists $self->{'stats'})
454 0 0 if ($self->{'_graphite'})
463 0 0 unless (eval { do { $self->{'_graphite'}->send($metric, $stats->{$stat}, $time); 1 } })
524 0 1 if (my($program) = map(lc($_), $msg =~ /$_PRE{'program'}/))
529 0 0 if (exists $self->{'programs'}{$program} and $self->{'programs'}{$program} > 0)
531 0 0 unless exists $clients->{$SID}{'subscription'}{$program}
542 0 1 if (keys %{$$self{'words'};})
544 0 0 if (index($msg, $word) != -1)
546 0 0 unless exists $clients->{$SID}{'match'}{$word}
558 0 1 if (keys %{$$self{'regex'};})
562 0 0 if ($hit{$re} or $msg =~ /$re/)
574 1 0 if ($dispatched > 0)