Branch Coverage

blib/lib/Socialtext/Resting/DefaultRester.pm
Criterion Covered Total %
branch 9 32 28.1


line true false branch
76 0 0 unless defined $args{$k}
86 0 1 if $@
94 0 1 unless (-e $file)
95 0 0 unless open my $fh, ">$file"
102 0 0 unless close $fh
107 0 1 unless open my $fh, $file
109 2 2 if (/^(\w+)\s*=\s*(\S+)\s*$/)
111 1 1 if $key eq 'server'
117 0 1 if (not $second_try and -w $file and $pw and not $pw =~ /^CRYPTED_/)
118 0 0 unless _change_password($file, $opts{'password'})
122 0 1 if ($opts{'password'} and $opts{'password'} =~ /^CRYPTED_(.+)/)
124 0 0 if ($@) { }
138 0 0 if $@
145 0 0 unless open my $fh, $file
149 0 0 unless open my $wfh, ">$file"
151 0 0 unless close $wfh