Branch Coverage

blib/lib/Net/SNMP/Security/Community.pm
Criterion Covered Total %
branch 12 34 35.2


line true false branch
61 0 1 if (/^-?community$/i) { }
0 1 elsif (/^-?debug$/i) { }
1 0 elsif (/^-?version$/i) { }
71 0 1 if (defined $$this{'_error'})
72 0 0 wantarray ? :
77 1 0 wantarray ? :
87 0 1 if (@_ < 3)
91 0 1 if ($pdu->version != $$this{'_version'})
99 0 1 unless (defined $msg->append($pdu->copy))
104 0 1 unless (defined $msg->prepare(OCTET_STRING(), $$this{'_community'}))
109 0 1 unless (defined $msg->prepare(INTEGER(), $$this{'_version'}))
114 0 1 unless (defined $msg->prepare(SEQUENCE()))
129 0 0 if @_ < 2
131 0 0 if ($msg->security_name ne $$this{'_community'})
152 0 0 if ($$this{'_version'} == SNMP_VERSION_2C())
170 0 0 unless defined $community
181 0 1 if ($version != SNMP_VERSION_1() and $version != SNMP_VERSION_2C())