line |
true |
false |
branch |
80
|
58 |
0 |
unless (defined $self->{'DirStartRE'}) |
89
|
58 |
0 |
unless defined $self->{'Math'} |
91
|
58 |
0 |
unless ($self->{'Math'}{'VarHash'}{'_Initialised'}) |
111
|
60 |
56 |
if (defined $self->{$_}) |
118
|
58 |
0 |
if (defined $opts{'File'}) |
119
|
2 |
56 |
if (defined $opts{'Fd'}) { } |
123
|
0 |
56 |
unless $self->open('binmode', '', %opts) |
141
|
0 |
56 |
unless defined $args{'File'} |
149
|
56 |
0 |
if (not defined $args{'Fd'}) { } |
150
|
0 |
56 |
unless $Fd = $self->openFile($args{'Name'}) |
166
|
0 |
86 |
unless $Fd = 'IO::File'->new($name, 'r') |
171
|
0 |
86 |
if $self->{'Frame'}{'binmode'} |
189
|
199 |
258 |
if (defined $args{'Args'}) |
200
|
1152 |
2047 |
if defined $args{$p} |
202
|
2281 |
918 |
if (defined $self->{'Frame'} and defined $self->{'Frame'}{$p}) |
203
|
1535 |
746 |
unless defined $f{$p} |
234
|
0 |
134 |
unless $self->closeFrame |
246
|
0 |
457 |
unless defined $self->{'Frame'}{'Code'} or defined $self->{'Frame'}{'Fd'} |
249
|
0 |
457 |
if $self->error |
261
|
201 |
256 |
if ($self->{'Frame'}{'LocalVars'}) |
266
|
227 |
226 |
if defined $alist->{$k} |
274
|
32 |
234 |
if $self->{'Frame'}{'Code'} and $old->{'CpMove'} |
290
|
0 |
0 |
unless $self->{'Frame'}{'Fd'} |
301
|
0 |
0 |
unless $self->{'Fd'} |
317
|
5 |
27 |
if (substr($name, 0, 1) eq '$') |
318
|
0 |
5 |
unless $name =~ m[^\$(\w+)(/.+)$]i |
324
|
0 |
5 |
unless $pt = $self->{'Math'}->Parse($var) and @val = $self->{'Math'}->Eval($pt) |
329
|
0 |
12 |
unless $fp |
330
|
5 |
7 |
if -e $fp |
334
|
0 |
0 |
if $noerr |
352
|
4 |
35 |
if index($name, '/') == 0 |
355
|
9 |
26 |
if (substr($name, 0, 1) eq '#') |
366
|
0 |
26 |
if $self->{'TopIsFd'} and @{$self->{'FrameStk'};} == 1 |
372
|
0 |
26 |
unless $last = $self->GetLastFileName |
388
|
26 |
22 |
if exists $self->{'FrameStk'}[$frames]{'Fd'} |
404
|
0 |
838 |
if ($2 eq '0') { } |
|
1 |
837 |
elsif ($2 eq 'e') { } |
|
837 |
0 |
elsif ($2 eq 'v') { } |
409
|
0 |
837 |
unless $arg =~ s/^{(\w+|\w+\[\w+\])}//i |
413
|
0 |
837 |
unless defined $vv |
420
|
0 |
2854 |
if $arg =~ /\\/ |
438
|
10 |
2459 |
if ($c1 eq '"' or $c1 eq q[']) { } |
440
|
0 |
10 |
unless $arg =~ s/^(["'])((\\{2})*|(.*?[^\\](\\{2})*))\1\s*// |
452
|
557 |
38 |
if $doEsc |
470
|
0 |
38 |
unless $arg ne '' |
473
|
0 |
38 |
unless @args = $self->SplitArgs($arg, 0) |
478
|
0 |
38 |
unless $code->{'Name'} =~ /^\w+$/ |
481
|
0 |
38 |
if exists $self->{'subs'}{$code->{'Name'}} |
487
|
9 |
29 |
if @args |
555
|
347 |
219 |
if ($InLine =~ /^($self->{'DirStartRE'})(\w+)\s*(.*)/ and defined $ctlDirectives{$2} || defined $self->{'subs'}{$2}) { } |
557
|
219 |
0 |
unless defined $frame->{'Code'} |
565
|
41 |
306 |
if (exists $loops{$dir}) |
568
|
3 |
38 |
if $arg =~ s/^-i\s*(\d+)\s*// |
572
|
0 |
41 |
unless $arg ne '' |
576
|
14 |
27 |
if ($dir eq 'for') |
579
|
0 |
14 |
unless @e == 3 |
582
|
11 |
3 |
if $e[0] =~ /\S/ |
584
|
0 |
14 |
unless $e[1] =~ /\S/ |
587
|
11 |
3 |
if ($e[2] =~ /\S/) |
589
|
0 |
11 |
unless $line->{'For3'} = $self->{'Math'}->Parse($e[2]) |
597
|
89 |
258 |
if (exists $makeExpr{$dir}) |
599
|
43 |
46 |
if (substr($arg, 0, length $self->{'DirStart'}) eq $self->{'DirStart'}) { } |
603
|
0 |
46 |
unless $arg =~ /\S/ and $line->{'Expr'} = $self->{'Math'}->Parse($arg) |
607
|
100 |
247 |
if (defined $blkPairs{$dir}) { } |
|
100 |
147 |
elsif (defined $blkPairs{$blocks[-1]{'type'}} and $blkPairs{$blocks[-1]{'type'}} eq $dir) { } |
|
0 |
147 |
elsif (defined $endings{$dir}) { } |
617
|
0 |
100 |
if $arg =~ /(\S+)/ and $blk->{'type'} ne $1 |
620
|
41 |
59 |
if (exists $loops{$blk->{'type'}}) |
635
|
55 |
292 |
if $dir eq 'done' and @blocks == 0 |
641
|
0 |
511 |
unless ($InLine = $self->{'Frame'}{'Fd'}->getline) |
664
|
112 |
53 |
if ($code->{'ArgNames'} and @{$code->{'ArgNames'};}) |
671
|
223 |
5 |
if @args |
687
|
282 |
193 |
if ($esc = exists $replay->{'SubCond'} or substr($arg, 0, length $self->{'DirStart'}) eq $self->{'DirStart'} and $arg =~ /^$self->{'DirStartRE'}(\w+)\s*(.*)/) { } |
691
|
244 |
38 |
if $esc |
696
|
66 |
216 |
unless (exists $self->{'subs'}{$sub}) |
698
|
0 |
66 |
unless exists $condDirectives{$sub} |
702
|
141 |
141 |
if ($self->{'Frame'}{'CondReRun'}) { } |
709
|
122 |
19 |
if ($esc) { } |
715
|
33 |
108 |
if ($intDir) { } |
733
|
19 |
122 |
unless $esc |
736
|
0 |
141 |
if $self->{'Frame'}{'intDir'} |
738
|
122 |
19 |
if $esc |
743
|
158 |
35 |
if ($replay and exists $replay->{'Expr'}) { } |
747
|
0 |
35 |
unless $iftree = $self->{'Math'}->Parse($arg) |
753
|
35 |
299 |
if $replay->{'Not'} |
766
|
457 |
0 |
unless $self->{'Error'} |
774
|
0 |
0 |
unless $self->{'Fd'} and $self->{'Fd'}->opened |
789
|
0 |
0 |
if $self->{'OnError'} eq 'die' |
790
|
0 |
0 |
if $self->{'OnError'} eq 'warn' |
792
|
0 |
0 |
if ($einval) |
817
|
0 |
1008 |
unless defined $self->{'Frame'}{'Code'} or defined $self->{'Frame'}{'Fd'} |
825
|
0 |
3022 |
if $self->{'Error'} |
828
|
58 |
2964 |
unless @{$self->{'FrameStk'};} |
834
|
19 |
2945 |
if (defined($_ = pop @{$$frame{'PushedInput'};})) { } |
|
1713 |
1232 |
elsif (exists $frame->{'Code'}) { } |
840
|
83 |
1630 |
if ($frame->{'CodeLine'} > $frame->{'Code'}{'LastLine'}) |
853
|
77 |
1155 |
unless ($_) |
857
|
0 |
77 |
unless $self->closeFrame |
860
|
77 |
0 |
if $self->{'Frame'} |
866
|
0 |
1155 |
if ($self->{'Raw'}) |
887
|
526 |
2322 |
if (/^$self->{'DirStartRE'}#/) |
888
|
0 |
526 |
if $self->{'trace'} |
892
|
2322 |
0 |
if $self->{'Trim'} |
896
|
611 |
1711 |
unless (/^($self->{'DirStartRE'})(\w+)\s*(.*)/ and defined $ctlDirectives{$2} || defined $self->{'subs'}{$2}) |
898
|
60 |
551 |
unless ($frame->{'Generate'}) |
903
|
0 |
551 |
if $self->{'trace'} > 1 |
914
|
0 |
0 |
if $self->{'trace'} and $frame->{'Generate'} |
920
|
100 |
1611 |
if ($dir eq 'if' or $dir eq 'unless') |
923
|
77 |
23 |
unless $frame->{'CondReRun'} |
930
|
100 |
0 |
if ($frame->{'Generate'}) |
934
|
0 |
100 |
unless defined $gen |
936
|
23 |
77 |
if $frame->{'CondReRun'} |
942
|
29 |
1582 |
if ($dir eq 'elseif' or $dir eq 'elsif') |
944
|
0 |
29 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
946
|
0 |
29 |
if $frame->{'Else'} |
953
|
27 |
2 |
if ($frame->{'ParentGenerate'} and not $frame->{'DidGenerate'}) { } |
956
|
0 |
27 |
unless defined $gen |
959
|
12 |
15 |
if $frame->{'CondReRun'} |
967
|
41 |
1541 |
if ($dir eq 'else') |
970
|
0 |
41 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
972
|
0 |
41 |
if $frame->{'Else'} |
976
|
26 |
15 |
if ($frame->{'DidGenerate'}) { } |
984
|
73 |
1468 |
if ($dir eq 'fi') |
986
|
0 |
73 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
993
|
25 |
1443 |
unless $frame->{'Generate'} |
995
|
151 |
1292 |
if ($dir eq 'let') |
997
|
87 |
64 |
if ($replay and exists $replay->{'Expr'}) { } |
1001
|
0 |
64 |
unless $iftree = $self->{'Math'}->Parse($arg) |
1010
|
399 |
893 |
if ($dir eq 'echo') |
1016
|
348 |
545 |
if (exists $loops{$dir}) |
1029
|
90 |
106 |
unless ($doneDone or $frame->{'CondReRun'}) |
1035
|
17 |
331 |
unless (exists $frame->{'Code'}) |
1036
|
0 |
17 |
unless $code = $self->ReadLoop($dir, $_, $arg) |
1043
|
90 |
106 |
unless ($doneDone or $frame->{'CondReRun'}) |
1055
|
15 |
75 |
if exists $replay->{'Init'} |
1060
|
242 |
106 |
unless ($frame->{'CondReRun'}) |
1063
|
0 |
242 |
if $frame->{'LoopMax'} and ++$frame->{'LoopCnt'} > $frame->{'LoopMax'} |
1066
|
86 |
156 |
if exists $replay->{'For3'} and $frame->{'LoopCnt'} != 1 |
1071
|
106 |
242 |
if $frame->{'CondReRun'} |
1072
|
52 |
190 |
unless $bool |
1078
|
122 |
423 |
if ($dir eq 'done') |
1080
|
0 |
122 |
unless exists $frame->{'LoopMax'} |
1088
|
27 |
396 |
if ($dir eq 'break' or $dir eq 'last') |
1090
|
1 |
26 |
if $arg =~ /\s*(\d+)/ |
1097
|
0 |
28 |
if exists $self->{'Frame'}{'ReturnFrom'} |
1101
|
0 |
28 |
unless $self->closeFrame |
1106
|
30 |
366 |
if ($dir eq 'continue' or $dir eq 'next') |
1108
|
10 |
20 |
if $arg =~ /\s*(\d+)/ |
1114
|
0 |
40 |
if exists $self->{'Frame'}{'ReturnFrom'} |
1116
|
30 |
10 |
if ($ls = exists $self->{'Frame'}{'LoopStart'} and --$loops <= 0) |
1122
|
0 |
10 |
unless $self->closeFrame |
1130
|
16 |
350 |
if ($dir eq 'local') |
1142
|
42 |
308 |
if ($dir eq 'include') |
1146
|
8 |
34 |
if ($arg =~ s/^-s\s*(\w+)\s*//) |
1149
|
0 |
8 |
if exists $self->{'Streams'}{$stream} |
1152
|
0 |
42 |
unless @args = $self->SplitArgs($arg, 1) |
1153
|
0 |
42 |
unless @args |
1157
|
2 |
40 |
if (not defined $stream and $fn =~ /^-p(\d*)$/) |
1158
|
1 |
1 |
$1 eq '' ? : |
1161
|
0 |
2 |
if $level > @{$self->{'FrameStk'};} |
1162
|
0 |
2 |
unless @args |
1167
|
12 |
30 |
if (substr($fn, 0, 1) eq '|') { } |
1169
|
0 |
12 |
unless $self->{'PipeOK'} |
1172
|
6 |
6 |
$fn eq '|' ? : |
1175
|
0 |
12 |
unless $fd |
1184
|
0 |
30 |
unless defined($fn = $self->ResolveFilename($fn)) |
1185
|
0 |
30 |
unless $fd = $self->openFile($fn) |
1190
|
8 |
34 |
if (defined $stream) { } |
1194
|
32 |
2 |
unless $level |
1195
|
2 |
32 |
if ($level) |
1206
|
0 |
308 |
if ($dir eq 'exit') |
1208
|
0 |
0 |
if ($arg ne '') |
1210
|
0 |
0 |
unless ($code =~ /^\d+$/) |
1220
|
0 |
308 |
if ($dir eq 'print') |
1221
|
0 |
0 |
$arg =~ s/^-e\b\s*// ? : |
1222
|
0 |
0 |
unless defined($arg = $self->ProcEscapes($arg)) |
1229
|
130 |
178 |
if ($dir eq 'return') |
1232
|
127 |
3 |
if $arg =~ /\S/ |
1235
|
0 |
130 |
unless $self->close |
1241
|
44 |
134 |
if ($dir eq 'eval') |
1242
|
0 |
44 |
unless $_ = $self->ProcEscapes($arg) |
1243
|
0 |
44 |
if /^$self->{'DirStartRE'}#/ |
1249
|
8 |
126 |
if ($dir eq 'close') |
1250
|
0 |
8 |
unless $arg =~ s/^-s\s*(\w+)\s*// |
1256
|
0 |
8 |
unless exists $self->{'Streams'}{$stream} |
1264
|
28 |
98 |
if ($dir eq 'read') |
1267
|
23 |
5 |
if $arg =~ s/^-s\s*(\w+)\s+// |
1270
|
0 |
28 |
unless $vname |
1273
|
23 |
5 |
if (defined $stream) { } |
1275
|
0 |
23 |
unless $fd = $self->{'Streams'}{$stream} |
1287
|
21 |
7 |
if ($_ = $fd->getline) { } |
1290
|
21 |
0 |
if $self->{'Trim'} |
1302
|
1 |
97 |
if $dir eq 'noop' |
1305
|
38 |
59 |
if ($dir eq 'sub') |
1307
|
0 |
38 |
unless $self->readSub($dir, $_, $arg) |
1311
|
2 |
57 |
if ($dir eq 'test') |
1315
|
0 |
2 |
unless @args and exists $an{$args[0]} and @args == $an{$args[0]} |
1317
|
2 |
0 |
if ($args[0] eq '-f') |
1320
|
2 |
0 |
if ($fn = $self->ResolveFilename($args[1], 1) and @stat = stat $fn) |
1329
|
0 |
57 |
if ($dir eq 'error') |
1330
|
0 |
0 |
if $arg eq '' |
1334
|
0 |
57 |
if ($dir eq 'set') |
1336
|
0 |
0 |
unless $arg =~ /^(\w+)=(\d+)/ and $options{$1} |
1341
|
0 |
57 |
if $dir eq 'function' or $dir eq 'do' or $dir eq 'case' or $dir eq 'switch' or $dir eq 'endswitch' |
1346
|
57 |
0 |
if (exists $self->{'subs'}{$dir}) |
1364
|
0 |
0 |
unless $self->{'Fd'} |
1366
|
0 |
0 |
unless wantarray |