Branch Coverage

blib/lib/Env/Dot/Functions.pm
Criterion Covered Total %
branch 43 48 89.5


line true false branch
67 22 0 if (-f $filepath) { }
80 0 21 if (exists $DOS_PLATFORMS{$Env::Dot::Functions::OSNAME}) { }
100 7 18 if ($r{'opts'}{'read:from_parent'})
102 4 3 if ($parent_filepath) { }
2 1 elsif (not $r{'opts'}{'read:allow_missing_parent'}) { }
126 7 15 if defined $parent_path and -f $parent_filepath
144 18 149 if (/ ^ [[:space:]]{0,} [#]{1} [[:space:]]{1,} envdot [[:space:]]{1,} [(] (? [^)]{0,}) [)] [[:space:]]{0,} $ /msx) { }
23 126 elsif (/ ^ [[:space:]]{0,} [#]{1} .* $ /msx) { }
3 123 elsif (/ ^ [[:space:]]{0,} $ /msx) { }
122 1 elsif (/ ^ (? [^=]{1,}) = (? .*) $ /msx) { }
157 5 21 unless (exists $DOTENV_OPTIONS{$key})
193 117 5 if ($options{'file:type'} eq 'shell') { }
5 0 elsif ($options{'file:type'} eq 'plain') { }
194 95 22 if ($value =~ / ^ ['"]{1} (? .*) ["']{1} # Get value from between quotes (?: [;] [[:space:]]{0,} export [[:space:]]{1,} $name)? # optional [[:space:]]{0,} # optional whitespace at the end $ /msx)
208 1 116 if ($name =~ /^ [[:space:]]{0,} export [[:space:]]{1,} /msx)
241 3 34 if $val eq "true" or $val eq "True"
242 1 36 if $val eq "false" or $val eq "False"
252 0 27 unless $fh->open("< $filepath")
255 0 27 unless $fh->close
265 1 8 unless ($msg)
276 1 14 unless ($err)
279 1 13 if (not $line and $filepath)
282 9 4 defined $line ? :
8 5 defined $filepath ? :