Branch Coverage

blib/lib/POE/Component/Client/Pastebot.pm
Criterion Covered Total %
branch 25 44 56.8


line true false branch
18 2 0 unless exists $active_identifiers{++$current_id}
34 1 1 ref $options eq 'HASH' ? :
60 0 2 if ($self->{'alias'}) { }
77 2 0 unless $self->{'alias'}
95 0 2 if $self->{'_shutdown'}
97 2 0 if (ref $_[10] eq 'HASH') { }
105 0 2 unless ($args->{'event'})
110 0 2 unless ($args->{'url'})
115 0 2 if ($state eq 'paste' and not $args->{'paste'})
120 0 2 if ($state eq 'paste' and ref $args->{'paste'} eq 'ARRAY')
134 1 1 if ($req->{'command'} eq 'paste')
137 0 1 !($req->{'url'} =~ m[/$]) ? :
139 0 1 if (not defined $url) { }
144 0 1 if $req->{'channel'} and not $req->{'channel'} =~ /^#/
147 0 3 defined $req->{$_} && $req->{$_} ne '' ? :
163 1 0 if ($req->{'command'} eq 'fetch')
165 1 0 !($req->{'url'} =~ /\?tx=on$/) ? :
166 1 0 if (defined $urltmp and defined $urltmp->scheme and $urltmp->scheme =~ /http/) { }
194 0 2 if (not $response->is_success) { }
195 0 0 if ($response->is_error) { }
203 1 1 if ($req->{'command'} eq 'paste' and $response->content)
208 1 1 if ($req->{'command'} eq 'fetch' and $response->content)