| line |
true |
false |
branch |
|
170
|
0 |
5 |
if ($$self{'debug'}) |
|
512
|
0 |
27 |
if ($args{'debug'}) |
|
516
|
0 |
27 |
unless ($args{'input'}) |
|
526
|
19 |
8 |
if (ref $args{'input'} eq 'ARRAY') { } |
|
535
|
0 |
0 |
if ($args{'useorg'} and $args{'bak'} and -e $bakfile) |
|
544
|
0 |
19 |
if ($infn eq '-') { } |
|
551
|
0 |
19 |
unless open $fh, $infn |
|
560
|
19 |
0 |
if $fh_needs_closing |
|
574
|
6 |
0 |
if (defined $args{'filenames'} and @{$args{'filenames'};} and $#{$args{'filenames'};} == $#filenames) |
|
585
|
12 |
15 |
if ($args{'make_anchors'}) |
|
602
|
17 |
10 |
if ($args{'make_toc'}) |
|
614
|
16 |
1 |
unless ($args{'ignore_only_one'} and @the_list <= 1) |
|
620
|
16 |
1 |
if (@list_of_lists > 0) |
|
629
|
1 |
34 |
if ($val < 0) |
|
640
|
4 |
12 |
if ($args{'ol'}) |
|
645
|
3 |
1 |
if ($args{'ol_num_levels'} > 0) |
|
700
|
44 |
0 |
if (not $name =~ /^\s*$/) { } |
|
723
|
0 |
44 |
if $name eq '' |
|
771
|
0 |
12 |
if not $args{'quiet'} and $args{'filename'} |
|
799
|
698 |
314 |
if ($$tok{'type'} ne 'starttag') |
|
809
|
48 |
565 |
if ($$tok{'content'} =~ /^$key/i and not $notoc && $$tok{'content'} =~ /$notoc/) |
|
821
|
266 |
48 |
unless ($level) |
|
834
|
0 |
48 |
if ($tag =~ /title/i) |
|
837
|
9 |
39 |
if ($args{'use_id'}) { } |
|
840
|
1 |
8 |
if ($$sig_tok{'content'} =~ /ID\s*=\s*(['"])/i) |
|
843
|
1 |
0 |
if ($name) { } |
|
866
|
44 |
3 |
if ($$tok{'type'} eq 'text') { } |
|
|
3 |
0 |
elsif (not $adone and $$tok{'type'} eq 'starttag' and $$tok{'content'} =~ /^A/i) { } |
|
|
0 |
0 |
elsif ($$tok{'type'} eq 'starttag' or $$tok{'type'} eq 'endtag') { } |
|
873
|
3 |
0 |
if ($$tok{'content'} =~ /NAME\s*=\s*(['"])/i) { } |
|
|
0 |
0 |
elsif ($$next_tok{'type'} eq 'text') { } |
|
884
|
0 |
0 |
if $$tok{'content'} =~ /$endtag/i |
|
889
|
0 |
48 |
unless ($name) |
|
895
|
8 |
40 |
if (not $adone and $args{'use_id'}) |
|
897
|
8 |
0 |
if (not $name_in_anchor) { } |
|
916
|
48 |
54 |
if ($$tok{'type'} eq 'text') { } |
|
|
3 |
51 |
elsif (not $adone and $$tok{'type'} eq 'starttag' and $$tok{'content'} =~ /^A/i) { } |
|
|
51 |
0 |
elsif ($$tok{'type'} eq 'starttag' or $$tok{'type'} eq 'endtag') { } |
|
917
|
36 |
12 |
if (not $adone || $$tok{'content'} =~ /^\s*$/) { } |
|
930
|
3 |
0 |
if ($name_in_anchor) { } |
|
945
|
48 |
3 |
if $$tok{'content'} =~ /$endtag/i |
|
1027
|
548 |
1052 |
if ($$tok{'type'} eq 'starttag') |
|
1031
|
69 |
1116 |
if ($$tok{'content'} =~ /^$key/i and not $notoc && $$tok{'content'} =~ /$notoc/) |
|
1035
|
0 |
69 |
if ($args{'debug'}) |
|
1048
|
0 |
69 |
if (defined $args{'toc_before'}{$key}) { } |
|
1053
|
0 |
69 |
if (defined $args{'toc_after'}{$key}) { } |
|
1061
|
1531 |
69 |
unless ($level) |
|
1064
|
0 |
69 |
if ($args{'debug'}) |
|
1073
|
0 |
69 |
if ($tag =~ /title/i) |
|
1074
|
0 |
0 |
if ($found_title) { } |
|
1082
|
0 |
69 |
if ($args{'debug'}) |
|
1086
|
8 |
61 |
if ($$tok{'content'} =~ /ID\s*=\s*(['"])/i) |
|
1094
|
95 |
215 |
if ($$tok{'type'} eq 'text') { } |
|
|
61 |
154 |
elsif (not $adone and $$tok{'type'} eq 'starttag' and $$tok{'content'} =~ /^A/i) { } |
|
|
154 |
0 |
elsif ($$tok{'type'} eq 'starttag' or $$tok{'type'} eq 'endtag') { } |
|
1096
|
0 |
95 |
if ($args{'debug'}) |
|
1104
|
61 |
0 |
if ($$tok{'content'} =~ /NAME\s*=\s*(['"])/i) |
|
1112
|
0 |
154 |
if ($args{'debug'}) |
|
1118
|
69 |
85 |
if $$tok{'content'} =~ /$endtag/i |
|
1119
|
0 |
85 |
unless $args{'textonly'} or $$tok{'content'} =~ m[/?(hr|p|a|img)]i |
|
1125
|
0 |
69 |
if ($args{'debug'}) |
|
1129
|
0 |
69 |
if ($content =~ /^\s*$/) { } |
|
1139
|
19 |
50 |
if ($args{'inline'} and $args{'first_file'} eq $infile) { } |
|
1141
|
19 |
0 |
!$is_title ? : |
|
1145
|
50 |
0 |
!$is_title ? : |
|
1165
|
1 |
16 |
if ($args{'ignore_sole_first'} and $level_count{'1'} == 1 and $list_of_paths[0]{'level'} == 1) { } |
|
|
1 |
30 |
elsif ($args{'ignore_only_one'} and @list_of_paths == 1) { } |
|
1212
|
67 |
29 |
if ($path_depth == $depth) { } |
|
|
20 |
9 |
elsif ($path_depth > $depth) { } |
|
|
9 |
0 |
elsif ($path_depth < $depth) { } |
|
1233
|
0 |
27 |
if (defined $args{'prepend_list'} and @{$args{'prepend_list'};}) |
|
1237
|
0 |
0 |
if ($#list_of_lists == 0 and ref $list_of_lists[0] eq 'ARRAY') { } |
|
1248
|
0 |
27 |
if (defined $args{'append_list'} and @{$args{'append_list'};}) |
|
1252
|
0 |
0 |
if ($#list_of_lists == 0 and ref $list_of_lists[0] eq 'ARRAY') { } |
|
1301
|
0 |
12 |
if ($args{'make_anchors'} and not $args{'to_string'} and $args{'overwrite'}) |
|
1308
|
0 |
0 |
$args{'make_toc'} && $args{'inline'} && !$args{'outfile'} ? : |
|
1316
|
0 |
0 |
if ($args{'bak'} and not $args{'useorg'} && -e $bakfile) |
|
1320
|
0 |
0 |
unless $args{'quiet'} |
|
1325
|
0 |
0 |
unless open $ofh, "> $filename" |
|
1327
|
0 |
0 |
unless $args{'quiet'} |
|
1338
|
17 |
10 |
if ($args{'make_toc'}) { } |
|
|
10 |
0 |
elsif ($args{'make_anchors'} and !$args{'overwrite'} || $args{'to_string'}) { } |
|
1340
|
16 |
1 |
if ($args{'toc'}) { } |
|
1344
|
0 |
16 |
if ($args{'header'}) { } |
|
|
12 |
4 |
elsif (not $args{'toc_only'} || $args{'inline'}) { } |
|
1345
|
0 |
0 |
if (-f $args{'header'}) { } |
|
1347
|
0 |
0 |
unless open HEADER, $args{'header'} |
|
1365
|
12 |
0 |
if $args{'title'} |
|
1371
|
15 |
1 |
if ($args{'toclabel'}) |
|
1379
|
0 |
16 |
if ($args{'footer'}) { } |
|
|
12 |
4 |
elsif (not $args{'toc_only'} || $args{'inline'}) { } |
|
1380
|
0 |
0 |
if (-f $args{'footer'}) { } |
|
1382
|
0 |
0 |
unless open FOOTER, $args{'footer'} |
|
1414
|
27 |
0 |
if ($output) |
|
1421
|
8 |
19 |
if ($args{'to_string'}) { } |
|
|
17 |
2 |
elsif ($args{'outfile'} and $args{'outfile'} ne '-') { } |
|
|
0 |
2 |
elsif (not $args{'overwrite'}) { } |
|
1426
|
0 |
17 |
unless open $ofh, '> ' . $args{'outfile'} |
|
1434
|
5 |
22 |
if ($args{'inline'}) { } |
|
1444
|
3 |
2 |
if ($args{'to_string'}) { } |
|
|
2 |
0 |
elsif ($args{'overwrite'}) { } |
|
|
0 |
0 |
elsif ($args{'outfile'} and $args{'outfile'} ne '-') { } |
|
|
0 |
0 |
elsif ($args{'outfile'}) { } |
|
1447
|
0 |
3 |
if ($args{'debug'}) |
|
1455
|
2 |
0 |
if ($args{'bak'} and not $args{'useorg'} && -e $bakfile) |
|
1459
|
0 |
2 |
unless $args{'quiet'} |
|
1464
|
0 |
2 |
unless open $ofh, "> $first_file" |
|
1467
|
0 |
2 |
unless $args{'quiet'} |
|
1473
|
0 |
0 |
unless $args{'quiet'} |
|
1482
|
5 |
17 |
if ($args{'to_string'}) { } |
|
|
17 |
0 |
elsif ($args{'outfile'} and $args{'outfile'} ne '-') { } |
|
1487
|
0 |
17 |
unless $args{'quiet'} |
|
1496
|
19 |
8 |
if ($file_needs_closing) |
|
1501
|
8 |
19 |
if ($args{'to_string'}) { } |
|
1536
|
5 |
0 |
if ($args{'in_string'}) { } |
|
1543
|
0 |
0 |
unless open FILE, $infile |
|
1567
|
315 |
265 |
if ($$tok{'type'} eq 'starttag' or $$tok{'type'} eq 'endtag' or $$tok{'type'} eq 'comment') { } |
|
1571
|
5 |
310 |
if (not $toc_done and $$tok{'content'} =~ /$toc_tag/i) { } |
|
1575
|
4 |
1 |
unless ($args{'toc_tag_replace'}) |
|
1607
|
0 |
2 |
unless open SRC, $src |
|
1609
|
0 |
2 |
unless open DST, "> $dst" |