line |
true |
false |
branch |
9
|
4 |
0 |
unless defined $cmd |
10
|
0 |
0 |
if ($cmd eq '-load_dotenv') { } |
22
|
1 |
1 |
unless defined $prefix |
30
|
0 |
1 |
unless defined $filename |
31
|
0 |
1 |
unless -f $filename |
33
|
0 |
1 |
unless open my $fh, "<:raw:encoding(UTF-8)", $filename |
43
|
16 |
11 |
if (my($k, $v) = $line =~ m[
\A\s*
# 'export' (bash), 'set'/'setenv' ([t]csh) are optional keywords:
(?: (?:export|set|setenv) \s+ )?
( $varname_re )
(?: \s* (?:=|\s+) \s* ) # separator is '=' or spaces
(
'[^']*(?:\\'|[^']*)*' # single quoted value
|"[^"]*(?:\\"|[^"]*)*" # or double quoted value
| [^\#\r\n]+ # or unquoted value
)?
\s* (?: \# .* )? # inline comment
\z]sx) |
57
|
2 |
14 |
unless defined $v |
63
|
3 |
13 |
if ($v =~ s/\A(['"])(.*)\1\z/$2/) |
64
|
1 |
2 |
if ($1 eq '"') { } |
73
|
14 |
2 |
if ($interpolate_vars) |
76
|
1 |
6 |
exists $ENV{$1} ? : |
87
|
1 |
0 |
unless ($opts{'rules'}) |
104
|
3 |
4 |
if ($rule->{'key'} and $k =~ /$rule->{'key'}/ or $rule->{'value'} and $v =~ /$rule->{'value'}/) |
107
|
3 |
0 |
if ($rule->{'key'} and $k =~ /$rule->{'key'}/) { } |
|
0 |
0 |
elsif ($rule->{'value'} and $v =~ /$rule->{'value'}/) { } |
110
|
0 |
3 |
if $rule->{'drop'} |