Branch Coverage

blib/lib/SNMP/Extension/PassPersist.pm
Criterion Covered Total %
branch 32 68 47.0


line true false branch
23 6 0 eval 'use Sort::Key::OID 0.04 qw; 1' ? :
87 2 15 if ($ref and $ref eq 'HASH') { }
91 3 12 if $ref
92 2 10 if @args % 2 == 1
103 2 20 if defined $attrs{$code_attr} and ref $attrs{$code_attr} ne 'CODE'
143 0 4 unless GetOptions \my(%options), ('get|g=s', 'getnext|n=s', 'set|s=s')
153 1 3 if (any sub { defined $options{$_}; } , 'get', 'getnext', 'set') { }
164 4 0 unless ($mode_passpersist and $backend_fork)
166 1 3 unless eval { do { $self->backend_init->($self); 1 } }
171 1 2 unless eval { do { $self->backend_collect->($self); 1 } }
177 1 1 if ($mode_pass) { }
179 1 2 if ($options{$op})
196 0 1 if ($backend_fork)
202 0 0 unless defined $child
206 0 0 if $child == 0
217 0 1 if ($backend_fork)
232 2 0 if ($fh == $self->input)
233 1 1 if (my $cmd = <$fh>) { }
243 0 2 if ($backend_fork and $fh == $pipe)
248 0 0 unless length $buffer
268 0 2 if ($delay <= 0)
269 0 0 unless ($backend_fork)
271 0 0 unless eval { do { $self->backend_collect->($self); 1 } }
282 0 1 if ($backend_fork)
303 0 0 unless eval { do { $self->backend_init->($self); 1 } }
311 0 0 unless eval { do { $self->backend_collect->($self); 1 } }
338 0 2 unless exists $snmp_ext_type{$type}
355 0 0 if any sub { not $snmp_ext_type{$$_[0]}; } , values %$new_tree
399 2 0 if ($$oid_tree{$req_oid}) { }
445 1 0 if (exists $$dispatch{$cmd}) { }
477 0 0 unless (@$entries)
488 0 0 if $$entries[$i] eq $req_oid
491 0 0 if $curr_entry_idx == -1 and index($$entries[$i], $req_oid) >= 0
510 0 0 unless (@$entries)