Branch Coverage

blib/lib/Passwd/Linux.pm
Criterion Covered Total %
branch 28 60 46.6


line true false branch
38 4 2 if ($hold_lock != 0)
40 0 4 if ($lock != 0)
46 0 6 unless (open FILE, '
47 0 0 if ($hold_lock != 0)
49 0 0 if ($lock != 0) { }
60 6 0 if (open FILE, '
64 0 0 if ($hold_lock != 0) { }
66 0 0 if ($lock != 0) { }
78 0 6 if ($#pass != $#shad)
107 0 3 if ($have_lock == 0)
111 3 0 if (exists $entries{':ORDER:'}) { }
118 0 3 unless (rename '/etc/passwd', '/etc/opasswd')
123 0 3 unless (rename '/etc/shadow', '/etc/oshadow')
126 0 0 if ($err == 0)
132 0 3 unless (open PASS, '>/etc/passwd')
136 0 0 if ($err == 0 or $err2 == 0)
143 0 3 unless (open SHAD, '>/etc/shadow')
147 0 0 if ($err == 0 or $err2 == 0)
155 3 0 if (@sgrp > 1) { }
165 62 1 if (exists $entries{$user})
180 0 3 if ($lock != 0)
194 1 1 if (exists $entries{$info[0]}) { }
204 0 2 if (eval { do { &_write_and_release(%entries) } })
215 0 2 if ($#info < 1 or $#info > 13)
219 1 1 if (exists $entries{$info[0]}) { }
236 0 1 if ($#info < 1 or $#info > 13)
241 0 1 if (exists $entries{$info[0]}) { }
259 1 1 if (exists $entries{$login})
270 1 0 if (exists $entries{$login})
272 1 0 if ($data[2] != 0) { }