| line |
true |
false |
branch |
|
82
|
61 |
0 |
unless defined $self->{'OutStreams'}{'STDOUT'} |
|
83
|
61 |
0 |
unless defined $self->{'OutStreams'}{'STDERR'} |
|
87
|
61 |
0 |
unless (defined $self->{'DirStartRE'}) |
|
96
|
61 |
0 |
unless defined $self->{'Math'} |
|
98
|
61 |
0 |
unless ($self->{'Math'}{'VarHash'}{'_Initialised'}) |
|
118
|
63 |
59 |
if (defined $self->{$_}) |
|
125
|
61 |
0 |
if (defined $opts{'File'}) |
|
126
|
2 |
59 |
if (defined $opts{'Fd'}) { } |
|
130
|
0 |
59 |
unless $self->open('binmode', '', %opts) |
|
148
|
0 |
59 |
unless defined $args{'File'} |
|
156
|
59 |
0 |
if (not defined $args{'Fd'}) { } |
|
157
|
0 |
59 |
unless $Fd = $self->openFile($args{'Name'}) |
|
173
|
0 |
89 |
unless $Fd = 'IO::File'->new($name, 'r') |
|
178
|
0 |
89 |
if $self->{'Frame'}{'binmode'} |
|
196
|
200 |
265 |
if (defined $args{'Args'}) |
|
207
|
1175 |
2080 |
if defined $args{$p} |
|
209
|
2306 |
949 |
if (defined $self->{'Frame'} and defined $self->{'Frame'}{$p}) |
|
210
|
1556 |
750 |
unless defined $f{$p} |
|
241
|
0 |
134 |
unless $self->closeFrame |
|
253
|
0 |
465 |
unless defined $self->{'Frame'}{'Code'} or defined $self->{'Frame'}{'Fd'} |
|
256
|
0 |
465 |
if $self->error |
|
268
|
202 |
263 |
if ($self->{'Frame'}{'LocalVars'}) |
|
273
|
228 |
226 |
if defined $alist->{$k} |
|
281
|
32 |
234 |
if $self->{'Frame'}{'Code'} and $old->{'CpMove'} |
|
297
|
0 |
0 |
unless $self->{'Frame'}{'Fd'} |
|
302
|
0 |
0 |
unless ref $self->{'Frame'}{'Fd'} eq 'ARRAY' |
|
309
|
0 |
0 |
unless $self->{'Fd'} |
|
310
|
0 |
0 |
if ref $self->{'Fd'} eq 'ARRAY' |
|
326
|
5 |
27 |
if (substr($name, 0, 1) eq '$') |
|
327
|
0 |
5 |
unless $name =~ m[^\$(\w+)(/.+)$]i |
|
333
|
0 |
5 |
unless $pt = $self->{'Math'}->Parse($var) and @val = $self->{'Math'}->Eval($pt) |
|
338
|
0 |
12 |
unless $fp |
|
339
|
5 |
7 |
if -e $fp |
|
343
|
0 |
0 |
if $noerr |
|
361
|
4 |
35 |
if index($name, '/') == 0 |
|
364
|
9 |
26 |
if (substr($name, 0, 1) eq '#') |
|
375
|
0 |
26 |
if $self->{'TopIsFd'} and @{$self->{'FrameStk'};} == 1 |
|
381
|
0 |
26 |
unless $last = $self->GetLastFileName |
|
397
|
26 |
22 |
if exists $self->{'FrameStk'}[$frames]{'Fd'} |
|
413
|
0 |
840 |
if ($2 eq '0') { } |
|
|
1 |
839 |
elsif ($2 eq 'e') { } |
|
|
839 |
0 |
elsif ($2 eq 'v') { } |
|
418
|
0 |
839 |
unless $arg =~ s/^{(\w+|\w+\[\w+\])}//i |
|
422
|
0 |
839 |
unless defined $vv |
|
429
|
0 |
2866 |
if $arg =~ /\\/ |
|
447
|
10 |
2464 |
if ($c1 eq '"' or $c1 eq q[']) { } |
|
449
|
0 |
10 |
unless $arg =~ s/^(["'])((\\{2})*|(.*?[^\\](\\{2})*))\1\s*// |
|
461
|
560 |
38 |
if $doEsc |
|
479
|
0 |
38 |
unless $arg ne '' |
|
482
|
0 |
38 |
unless @args = $self->SplitArgs($arg, 0) |
|
487
|
0 |
38 |
unless $code->{'Name'} =~ /^\w+$/ |
|
490
|
0 |
38 |
if exists $self->{'subs'}{$code->{'Name'}} |
|
496
|
9 |
29 |
if @args |
|
564
|
347 |
219 |
if ($InLine =~ /^($self->{'DirStartRE'})(\w+)\s*(.*)/ and defined $ctlDirectives{$2} || defined $self->{'subs'}{$2}) { } |
|
566
|
219 |
0 |
unless defined $frame->{'Code'} |
|
574
|
41 |
306 |
if (exists $loops{$dir}) |
|
577
|
3 |
38 |
if $arg =~ s/^-i\s*(\d+)\s*// |
|
581
|
0 |
41 |
unless $arg ne '' |
|
585
|
14 |
27 |
if ($dir eq 'for') |
|
588
|
0 |
14 |
unless @e == 3 |
|
591
|
11 |
3 |
if $e[0] =~ /\S/ |
|
593
|
0 |
14 |
unless $e[1] =~ /\S/ |
|
596
|
11 |
3 |
if ($e[2] =~ /\S/) |
|
598
|
0 |
11 |
unless $line->{'For3'} = $self->{'Math'}->Parse($e[2]) |
|
606
|
89 |
258 |
if (exists $makeExpr{$dir}) |
|
608
|
43 |
46 |
if (substr($arg, 0, length $self->{'DirStart'}) eq $self->{'DirStart'}) { } |
|
612
|
0 |
46 |
unless $arg =~ /\S/ and $line->{'Expr'} = $self->{'Math'}->Parse($arg) |
|
616
|
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}) { } |
|
626
|
0 |
100 |
if $arg =~ /(\S+)/ and $blk->{'type'} ne $1 |
|
629
|
41 |
59 |
if (exists $loops{$blk->{'type'}}) |
|
644
|
55 |
292 |
if $dir eq 'done' and @blocks == 0 |
|
650
|
0 |
511 |
ref $self->{'Frame'}{'Fd'} eq 'ARRAY' ? : |
|
|
0 |
511 |
unless ($InLine = ref $self->{'Frame'}{'Fd'} eq 'ARRAY' ? shift @{$$self{'Frame'}{'Fd'};} : $self->{'Frame'}{'Fd'}->getline) |
|
673
|
112 |
53 |
if ($code->{'ArgNames'} and @{$code->{'ArgNames'};}) |
|
680
|
223 |
5 |
if @args |
|
696
|
286 |
193 |
if ($esc = exists $replay->{'SubCond'} or substr($arg, 0, length $self->{'DirStart'}) eq $self->{'DirStart'} and $arg =~ /^$self->{'DirStartRE'}(\w+)\s*(.*)/) { } |
|
700
|
244 |
42 |
if $esc |
|
705
|
70 |
216 |
unless (exists $self->{'subs'}{$sub}) |
|
707
|
0 |
70 |
unless exists $condDirectives{$sub} |
|
711
|
143 |
143 |
if ($self->{'Frame'}{'CondReRun'}) { } |
|
718
|
122 |
21 |
if ($esc) { } |
|
724
|
35 |
108 |
if ($intDir) { } |
|
742
|
21 |
122 |
unless $esc |
|
745
|
0 |
143 |
if $self->{'Frame'}{'intDir'} |
|
747
|
122 |
21 |
if $esc |
|
752
|
158 |
35 |
if ($replay and exists $replay->{'Expr'}) { } |
|
756
|
0 |
35 |
unless $iftree = $self->{'Math'}->Parse($arg) |
|
762
|
35 |
301 |
if $replay->{'Not'} |
|
776
|
465 |
0 |
unless $self->{'Error'} |
|
784
|
0 |
0 |
if ref $self->{'Frame'}{'Fd'} eq 'ARRAY' |
|
785
|
0 |
0 |
unless $self->{'Fd'} and $self->{'Fd'}->opened |
|
800
|
0 |
0 |
if $self->{'OnError'} eq 'die' |
|
801
|
0 |
0 |
if $self->{'OnError'} eq 'warn' |
|
803
|
0 |
0 |
if ($einval) |
|
827
|
1025 |
4 |
if $self->{'out'} eq '' |
|
840
|
0 |
9 |
unless (defined $strm) |
|
845
|
4 |
5 |
if (ref $strm eq 'IO::File' or ref $strm eq 'IO::Handle') |
|
849
|
1 |
4 |
if (ref $strm eq 'CODE') |
|
853
|
4 |
0 |
if (ref $strm eq 'ARRAY') |
|
871
|
0 |
1029 |
unless defined $self->{'Frame'}{'Code'} or defined $self->{'Frame'}{'Fd'} |
|
879
|
0 |
3088 |
if $self->{'Error'} |
|
882
|
61 |
3027 |
unless @{$self->{'FrameStk'};} |
|
888
|
21 |
3006 |
if (defined($_ = pop @{$$frame{'PushedInput'};})) { } |
|
|
1717 |
1289 |
elsif (exists $frame->{'Code'}) { } |
|
894
|
85 |
1632 |
if ($frame->{'CodeLine'} > $frame->{'Code'}{'LastLine'}) |
|
904
|
1286 |
3 |
ref $frame->{'Fd'} ne 'ARRAY' ? : |
|
907
|
81 |
1208 |
unless ($_) |
|
911
|
0 |
81 |
unless $self->closeFrame |
|
914
|
81 |
0 |
if $self->{'Frame'} |
|
920
|
0 |
1208 |
if ($self->{'Raw'}) |
|
941
|
539 |
2366 |
if (/^$self->{'DirStartRE'}#/) |
|
942
|
0 |
539 |
if $self->{'trace'} |
|
946
|
2366 |
0 |
if $self->{'Trim'} |
|
950
|
628 |
1738 |
unless (/^($self->{'DirStartRE'})(\w+)\s*(.*)/ and defined $ctlDirectives{$2} || defined $self->{'subs'}{$2}) |
|
952
|
61 |
567 |
unless ($frame->{'Generate'}) |
|
957
|
0 |
567 |
if $self->{'trace'} > 1 |
|
968
|
0 |
0 |
if $self->{'trace'} and $frame->{'Generate'} |
|
974
|
104 |
1634 |
if ($dir eq 'if' or $dir eq 'unless') |
|
977
|
79 |
25 |
unless $frame->{'CondReRun'} |
|
984
|
104 |
0 |
if ($frame->{'Generate'}) |
|
988
|
0 |
104 |
unless defined $gen |
|
990
|
25 |
79 |
if $frame->{'CondReRun'} |
|
996
|
29 |
1605 |
if ($dir eq 'elseif' or $dir eq 'elsif') |
|
998
|
0 |
29 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
|
1000
|
0 |
29 |
if $frame->{'Else'} |
|
1007
|
27 |
2 |
if ($frame->{'ParentGenerate'} and not $frame->{'DidGenerate'}) { } |
|
1010
|
0 |
27 |
unless defined $gen |
|
1013
|
12 |
15 |
if $frame->{'CondReRun'} |
|
1021
|
43 |
1562 |
if ($dir eq 'else') |
|
1024
|
0 |
43 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
|
1026
|
0 |
43 |
if $frame->{'Else'} |
|
1030
|
27 |
16 |
if ($frame->{'DidGenerate'}) { } |
|
1038
|
75 |
1487 |
if ($dir eq 'fi') |
|
1040
|
0 |
75 |
unless $frame->{'Type'} eq 'if' or $frame->{'Type'} eq 'unless' |
|
1047
|
26 |
1461 |
unless $frame->{'Generate'} |
|
1049
|
151 |
1310 |
if ($dir eq 'let') |
|
1051
|
87 |
64 |
if ($replay and exists $replay->{'Expr'}) { } |
|
1055
|
0 |
64 |
unless $iftree = $self->{'Math'}->Parse($arg) |
|
1064
|
401 |
909 |
if ($dir eq 'echo') |
|
1070
|
348 |
561 |
if (exists $loops{$dir}) |
|
1083
|
90 |
106 |
unless ($doneDone or $frame->{'CondReRun'}) |
|
1089
|
17 |
331 |
unless (exists $frame->{'Code'}) |
|
1090
|
0 |
17 |
unless $code = $self->ReadLoop($dir, $_, $arg) |
|
1097
|
90 |
106 |
unless ($doneDone or $frame->{'CondReRun'}) |
|
1109
|
15 |
75 |
if exists $replay->{'Init'} |
|
1114
|
242 |
106 |
unless ($frame->{'CondReRun'}) |
|
1117
|
0 |
242 |
if $frame->{'LoopMax'} and ++$frame->{'LoopCnt'} > $frame->{'LoopMax'} |
|
1120
|
86 |
156 |
if exists $replay->{'For3'} and $frame->{'LoopCnt'} != 1 |
|
1125
|
106 |
242 |
if $frame->{'CondReRun'} |
|
1126
|
52 |
190 |
unless $bool |
|
1132
|
122 |
439 |
if ($dir eq 'done') |
|
1134
|
0 |
122 |
unless exists $frame->{'LoopMax'} |
|
1142
|
27 |
412 |
if ($dir eq 'break' or $dir eq 'last') |
|
1144
|
1 |
26 |
if $arg =~ /\s*(\d+)/ |
|
1151
|
0 |
28 |
if exists $self->{'Frame'}{'ReturnFrom'} |
|
1155
|
0 |
28 |
unless $self->closeFrame |
|
1160
|
30 |
382 |
if ($dir eq 'continue' or $dir eq 'next') |
|
1162
|
10 |
20 |
if $arg =~ /\s*(\d+)/ |
|
1168
|
0 |
40 |
if exists $self->{'Frame'}{'ReturnFrom'} |
|
1170
|
30 |
10 |
if ($ls = exists $self->{'Frame'}{'LoopStart'} and --$loops <= 0) |
|
1176
|
0 |
10 |
unless $self->closeFrame |
|
1184
|
16 |
366 |
if ($dir eq 'local') |
|
1196
|
43 |
323 |
if ($dir eq 'include') |
|
1200
|
8 |
35 |
if ($arg =~ s/^-s\s*(\w+)\s*//i) |
|
1203
|
0 |
8 |
if exists $self->{'Streams'}{$stream} |
|
1206
|
0 |
43 |
unless @args = $self->SplitArgs($arg, 1) |
|
1207
|
0 |
43 |
unless @args |
|
1211
|
2 |
41 |
if (not defined $stream and $fn =~ /^-p(\d*)$/) |
|
1212
|
1 |
1 |
$1 eq '' ? : |
|
1215
|
0 |
2 |
if $level > @{$self->{'FrameStk'};} |
|
1216
|
0 |
2 |
unless @args |
|
1221
|
12 |
31 |
if (substr($fn, 0, 1) eq '|') { } |
|
|
1 |
30 |
elsif ($fn =~ /^(\@\w+)$/i) { } |
|
1223
|
0 |
12 |
unless $self->{'PipeOK'} |
|
1226
|
6 |
6 |
$fn eq '|' ? : |
|
1229
|
0 |
12 |
unless $fd |
|
1239
|
0 |
1 |
unless defined $self->{'OutStreams'}{$1} |
|
1242
|
0 |
30 |
unless defined($fn = $self->ResolveFilename($fn)) |
|
1243
|
0 |
30 |
unless $fd = $self->openFile($fn) |
|
1248
|
8 |
35 |
if (defined $stream) { } |
|
1252
|
33 |
2 |
unless $level |
|
1253
|
2 |
33 |
if ($level) |
|
1264
|
0 |
323 |
if ($dir eq 'exit') |
|
1266
|
0 |
0 |
if ($arg ne '') |
|
1268
|
0 |
0 |
unless ($code =~ /^\d+$/) |
|
1278
|
5 |
318 |
if ($dir eq 'print') |
|
1280
|
0 |
5 |
if $arg =~ s/^-e\b\s*// |
|
1281
|
5 |
0 |
if $arg =~ s/^-o\s*(\@?\w+)\b\s*//i |
|
1283
|
0 |
5 |
unless defined($arg = $self->ProcEscapes($arg)) |
|
1289
|
7 |
311 |
if ($dir eq 'out') |
|
1290
|
3 |
4 |
if ($arg eq '') { } |
|
|
2 |
2 |
elsif ($arg =~ s/^(-c)?\s*(\@\w+)\s*$//i) { } |
|
|
2 |
0 |
elsif ($arg =~ s/^(\w+)\s*$//i) { } |
|
1294
|
2 |
0 |
if defined $1 |
|
1297
|
0 |
2 |
unless defined $self->{'OutStreams'}{$2} |
|
1301
|
0 |
2 |
unless defined $self->{'OutStreams'}{$1} |
|
1311
|
130 |
181 |
if ($dir eq 'return') |
|
1314
|
127 |
3 |
if $arg =~ /\S/ |
|
1317
|
0 |
130 |
unless $self->close |
|
1323
|
44 |
137 |
if ($dir eq 'eval') |
|
1324
|
0 |
44 |
unless $_ = $self->ProcEscapes($arg) |
|
1325
|
0 |
44 |
if /^$self->{'DirStartRE'}#/ |
|
1331
|
8 |
129 |
if ($dir eq 'close') |
|
1332
|
0 |
8 |
unless $arg =~ s/^-s\s*(\w+)\s*//i |
|
1338
|
0 |
8 |
unless exists $self->{'Streams'}{$stream} |
|
1346
|
29 |
100 |
if ($dir eq 'read') |
|
1349
|
23 |
6 |
if $arg =~ s/^-s\s*(\w+)\s+//i |
|
1352
|
1 |
28 |
if ($arg =~ s/^(\@\w+)\s+//i) |
|
1354
|
0 |
1 |
unless defined $self->{'OutStreams'}{$1} |
|
1359
|
0 |
29 |
unless $vname |
|
1362
|
23 |
6 |
if (defined $stream) { } |
|
1364
|
0 |
23 |
unless $fd = $self->{'Streams'}{$stream} |
|
1376
|
1 |
28 |
defined $mem ? : |
|
|
22 |
7 |
if ($_ = defined $mem ? shift @{$$self{'OutStreams'}{$mem};} : $fd->getline) { } |
|
1379
|
22 |
0 |
if $self->{'Trim'} |
|
1391
|
1 |
99 |
if $dir eq 'noop' |
|
1394
|
38 |
61 |
if ($dir eq 'sub') |
|
1396
|
0 |
38 |
unless $self->readSub($dir, $_, $arg) |
|
1400
|
4 |
57 |
if ($dir eq 'test') |
|
1404
|
0 |
4 |
unless @args and exists $an{$args[0]} and @args == $an{$args[0]} |
|
1406
|
2 |
2 |
if ($args[0] eq '-f') |
|
1409
|
2 |
0 |
if ($fn = $self->ResolveFilename($args[1], 1) and @stat = stat $fn) |
|
1417
|
2 |
0 |
if ($args[0] eq '-m') |
|
1419
|
1 |
1 |
if (defined $self->{'OutStreams'}{$args[1]}) |
|
1427
|
0 |
57 |
if ($dir eq 'error') |
|
1428
|
0 |
0 |
if $arg eq '' |
|
1432
|
0 |
57 |
if ($dir eq 'set') |
|
1434
|
0 |
0 |
unless $arg =~ /^(\w+)=(\d+)/i and $options{$1} |
|
1439
|
0 |
57 |
if $dir eq 'function' or $dir eq 'do' or $dir eq 'case' or $dir eq 'switch' or $dir eq 'endswitch' |
|
1444
|
57 |
0 |
if (exists $self->{'subs'}{$dir}) |
|
1462
|
0 |
0 |
unless $self->{'Fd'} |
|
1464
|
0 |
0 |
unless wantarray |