Branch Coverage

blib/lib/Net/SSH/AuthorizedKeysFile.pm
Criterion Covered Total %
branch 32 54 59.2


line true false branch
31 0 24 if exists $self->{'keys'}
35 0 24 if defined $keys
45 2 1 if defined $file
46 0 3 unless defined $self->{'file'}
52 0 3 unless (open $fh, "<$self->{'file'}")
60 2 2 if ($rc < $self->{'ridiculous_line_len'})
65 1 1 if (index($chunk, "\n") >= 0)
80 1 2 unless ($result)
109 0 0 if (defined $new_content)
130 12 45 unless ($pk)
137 45 0 if (not $self->{'strict'} or $pk->sanity_check)
143 0 0 if ($self->{'strict'})
167 4 62 if $line =~ /^$/
168 5 57 if $line =~ /^#/
172 45 12 if (defined $key) { }
175 2 10 if ($self->{'abort_on_error'})
192 0 23 if defined $file
193 0 23 unless defined $self->{'file'}
198 0 23 unless open FILE, "<$self->{'file'}"
228 4 0 unless (defined $file)
232 0 4 unless (open FILE, ">$file")
256 72 4 if (defined $text)
259 15 57 if (length $text)
272 0 0 unless (defined $user)
275 0 0 unless (defined $user)
283 0 0 unless (defined $pwent[0])
300 0 0 unless defined $ssh_dir