| line |
true |
false |
branch |
|
164
|
0 |
0 |
if $AUTOLOAD =~ /\bDESTROY$/
|
|
212
|
0 |
646 |
if ($mode ne "w")
|
|
213
|
0 |
0 |
if ($mode ne "r")
|
|
225
|
646 |
0 |
if ($ref) { }
|
|
226
|
0 |
646 |
if ($ref eq 'ARRAY') { }
|
|
|
646 |
0 |
elsif ($ref eq 'SCALAR') { }
|
|
239
|
0 |
0 |
if ($mode eq "r")
|
|
242
|
0 |
0 |
if ($ref->can('getline')) { }
|
|
258
|
0 |
0 |
if ($mode eq "w")
|
|
261
|
0 |
0 |
if ($ref->can('print')) { }
|
|
281
|
0 |
0 |
if ($filename eq '-') { }
|
|
282
|
0 |
0 |
$mode eq 'w' ? :
|
|
294
|
0 |
646 |
if (not $fh) { }
|
|
302
|
0 |
646 |
if (ref $fh eq 'IO::File') { }
|
|
|
0 |
646 |
elsif ($filename eq '-') { }
|
|
305
|
0 |
0 |
if ($is_encoded_data) { }
|
|
309
|
0 |
0 |
if ($is_encoded_data) { }
|
|
354
|
1303 |
3 |
if ($ref) { }
|
|
355
|
2 |
1301 |
if ($ref eq 'ARRAY') { }
|
|
|
1301 |
0 |
elsif ($ref eq 'SCALAR') { }
|
|
363
|
0 |
0 |
if ($ref->can('getline')) { }
|
|
383
|
0 |
3 |
if ($filename eq '-') { }
|
|
386
|
0 |
0 |
if ($timeout_in_seconds and $timeout_in_seconds > 0) { }
|
|
387
|
0 |
0 |
unless eval {
|
|
404
|
3 |
0 |
if (open my $fh, '<', $filename) { }
|
|
407
|
0 |
3 |
unless $fh->close
|
|
465
|
0 |
0 |
$display_name ? :
|
|
472
|
0 |
0 |
if (length $nag_message and $Warn_count > 0)
|
|
509
|
0 |
0 |
if ($flag) { }
|
|
564
|
2 |
655 |
if utf8::is_utf8($string)
|
|
615
|
0 |
742 |
unless (defined $rcall_hash)
|
|
627
|
0 |
742 |
unless defined $rinput_list
|
|
628
|
742 |
0 |
$option_name ? :
|
|
635
|
2 |
1482 |
if (defined $rthing)
|
|
637
|
0 |
2 |
unless ($ref)
|
|
640
|
2 |
0 |
if ($ref eq "ARRAY")
|
|
644
|
0 |
2 |
if (ref $rthing ne "HASH")
|
|
659
|
2 |
740 |
if (defined $rvalid_words) { }
|
|
661
|
0 |
0 |
if $rexceptions and $rexceptions->{$word}
|
|
662
|
0 |
2 |
unless ($rvalid_words->{$word})
|
|
674
|
0 |
0 |
if $rexceptions and $rexceptions->{$word}
|
|
675
|
4693 |
0 |
if $word =~ /^\w+$/ and not $word =~ /^\d/
|
|
678
|
0 |
0 |
if ($allow_module_path and index $word, ":")
|
|
682
|
0 |
0 |
unless length $sub_word
|
|
683
|
0 |
0 |
if $sub_word =~ /^\w+$/ and not $sub_word =~ /^\d/
|
|
687
|
0 |
0 |
if $ok
|
|
693
|
742 |
0 |
unless @non_words
|
|
694
|
0 |
0 |
if ($on_error)
|
|
696
|
0 |
0 |
if ($on_error eq "warn" or $on_error eq "die")
|
|
700
|
0 |
0 |
if (length $str > $max_str_len - 1)
|
|
707
|
0 |
0 |
if $on_error eq "die"
|
|
739
|
0 |
0 |
if (${$rinput_string;} =~ /\s*\<\s*([\?\!]?[\-\w]+)/) { }
|
|
742
|
0 |
0 |
if $is_known_markup_word{lc $text}
|
|
745
|
0 |
0 |
unless $is_named_file
|
|
748
|
0 |
0 |
if $input_file =~ /html?$/i
|
|
888
|
0 |
657 |
if (my(@bad_keys) = grep({not exists $defaults{$_};} keys %input_hash))
|
|
908
|
0 |
2628 |
if (defined $hash_ref)
|
|
909
|
0 |
0 |
if (ref $hash_ref ne "HASH")
|
|
911
|
0 |
0 |
$what ? :
|
|
934
|
641 |
16 |
if ($stderr_stream) { }
|
|
936
|
0 |
641 |
unless ($fh_stderr)
|
|
960
|
0 |
657 |
if (defined $dump_options) { }
|
|
961
|
0 |
0 |
unless (defined $dump_options_type)
|
|
964
|
0 |
0 |
if ($dump_options_type ne "perltidyrc" and $dump_options_type ne "full")
|
|
981
|
0 |
657 |
if ($user_formatter)
|
|
989
|
657 |
0 |
if (defined $argv)
|
|
992
|
0 |
657 |
if ($rargv eq "SCALAR")
|
|
995
|
0 |
657 |
if ($rargv) { }
|
|
996
|
0 |
0 |
if ($rargv eq 'ARRAY') { }
|
|
1012
|
0 |
657 |
if ($msg)
|
|
1036
|
0 |
657 |
if ($Perl::Tidy::OSNAME eq 'VMS') { }
|
|
1048
|
9 |
648 |
if (@ARGV > 1)
|
|
1072
|
707 |
9 |
unless $_ eq "-pbp"
|
|
1083
|
0 |
657 |
if (defined $dump_getopt_flags)
|
|
1094
|
0 |
0 |
if ($opt =~ /(.*)(!|=.*|:.*)$/)
|
|
1102
|
0 |
657 |
if (defined $dump_options_category)
|
|
1107
|
0 |
657 |
if (defined $dump_abbreviations)
|
|
1112
|
0 |
657 |
if (defined $dump_options)
|
|
1117
|
0 |
657 |
if $quit_now
|
|
1123
|
0 |
657 |
if ($rOpts->{'dump-options'})
|
|
1150
|
0 |
6570 |
if ($rOpts->{$opt_name})
|
|
1152
|
0 |
0 |
if ($num_files != 1)
|
|
1157
|
0 |
0 |
if ($rOpts->{'outfile'})
|
|
1171
|
0 |
657 |
if ($user_formatter)
|
|
1185
|
657 |
0 |
$rOpts->{'encode-output-strings'} ? :
|
|
1188
|
0 |
657 |
unless (exists $default_file_extension{$rOpts->{'format'}})
|
|
1200
|
0 |
0 |
@Arg_files ? :
|
|
|
657 |
0 |
defined $source_stream ? :
|
|
1215
|
1 |
656 |
if ($rOpts->{'format'} eq "html")
|
|
1229
|
9 |
648 |
if (not $num_files and @ARGV_saved > 1)
|
|
1232
|
0 |
0 |
if ($opt_test =~ s/^[-]+// and not $file_test =~ /^[-]/ and not $file_test =~ /^\d+$/ and -e $file_test)
|
|
1245
|
0 |
0 |
if (not $exp) { }
|
|
|
0 |
0 |
elsif (@{$exp;} == 1) { }
|
|
1250
|
0 |
0 |
if ($long_name and defined $rOpts->{$long_name} and $rOpts->{$long_name} eq $file_test and not $is_option_with_file_parameter{$long_name})
|
|
1267
|
657 |
0 |
if ($output_extension)
|
|
1271
|
0 |
657 |
if ($in_place_modify and $backup_extension)
|
|
1285
|
657 |
0 |
if ($source_stream) { }
|
|
|
0 |
0 |
elsif (not @Arg_files) { }
|
|
1286
|
0 |
657 |
if (@Arg_files > 0)
|
|
1297
|
3 |
654 |
unless ref $source_stream
|
|
1309
|
0 |
0 |
if (-e $input_file) { }
|
|
1315
|
0 |
0 |
if ($input_file =~ /([\?\*\[\{])/)
|
|
1319
|
0 |
0 |
if ($ifile =~ /^\'(.+)\'$/)
|
|
1320
|
0 |
0 |
if ($ifile =~ /^\"(.+)\"$/)
|
|
1323
|
0 |
0 |
if (opendir $dh, "./")
|
|
1325
|
0 |
0 |
if /$pattern/
|
|
1327
|
0 |
0 |
unless @files
|
|
1338
|
0 |
0 |
unless (@Arg_files)
|
|
1348
|
657 |
0 |
unless ($rOpts->{'use-unicode-gcstring'})
|
|
1355
|
0 |
657 |
if (@Arg_files > 1)
|
|
1362
|
0 |
0 |
if (@Arg_files > 1 and $rOpts->{'file-size-order'})
|
|
1366
|
0 |
0 |
-e $_ ? :
|
|
1421
|
0 |
657 |
$Warn_count ? :
|
|
1423
|
0 |
657 |
wantarray ? :
|
|
1425
|
0 |
0 |
wantarray ? :
|
|
1442
|
659 |
0 |
unless defined $extension
|
|
1447
|
659 |
0 |
if (length $extension == 0)
|
|
1449
|
0 |
659 |
unless defined $extension
|
|
1456
|
659 |
0 |
if ($extension =~ /^[a-zA-Z0-9]/)
|
|
1483
|
2 |
655 |
if ($in_place_modify)
|
|
1484
|
2 |
0 |
if ($destination_stream or not defined $source or ref $source or $source eq '-' or $rOpts->{'outfile'} or defined $rOpts->{'output-path'}) { }
|
|
|
0 |
0 |
elsif ($rOpts->{'standard-output'}) { }
|
|
1500
|
0 |
0 |
if (not $rOpts_in_profile->{'backup-and-modify-in-place'}) { }
|
|
|
0 |
0 |
elsif ($rOpts_in_profile->{'standard-output'}) { }
|
|
1520
|
0 |
657 |
if ($in_place_modify)
|
|
1541
|
0 |
0 |
if ($delete_backup > 1)
|
|
1551
|
0 |
657 |
if (defined $backup_method and $backup_method ne "copy" and $backup_method ne "move")
|
|
1580
|
0 |
0 |
unless (-f $input_file)
|
|
1589
|
0 |
0 |
if (-f $backup_file)
|
|
1590
|
0 |
0 |
unless unlink $backup_file
|
|
1597
|
0 |
0 |
unless File::Copy::copy($input_file, $backup_file)
|
|
1608
|
0 |
0 |
if (defined $write_time)
|
|
1609
|
0 |
0 |
unless utime $read_time, $write_time, $backup_file
|
|
1615
|
0 |
0 |
unless open my $fout, ">", $input_file
|
|
1620
|
0 |
0 |
if ($self->[9]) { }
|
|
1625
|
0 |
0 |
if (ref $routput_string eq 'SCALAR') { }
|
|
1626
|
0 |
0 |
unless $fout->print(${$routput_string;})
|
|
1639
|
0 |
0 |
unless $fout->close
|
|
1649
|
0 |
0 |
if (not $self->[25] and defined $write_time)
|
|
1650
|
0 |
0 |
unless utime $read_time, $write_time, $input_file
|
|
1660
|
0 |
0 |
if ($delete_backup and -f $backup_file)
|
|
1664
|
0 |
0 |
if ($delete_backup > 1 and $self->[15]->get_warning_count)
|
|
1676
|
0 |
0 |
if (not -s $input_file and -s $backup_file and $delete_backup == 1) { }
|
|
1682
|
0 |
0 |
unless unlink $backup_file
|
|
1722
|
0 |
0 |
unless (-f $input_file)
|
|
1730
|
0 |
0 |
if (-f $backup_name)
|
|
1731
|
0 |
0 |
unless unlink $backup_name
|
|
1741
|
0 |
0 |
if (-l $input_file) { }
|
|
1742
|
0 |
0 |
unless File::Copy::copy($input_file, $backup_name)
|
|
1746
|
0 |
0 |
unless rename $input_file, $backup_name
|
|
1753
|
0 |
0 |
unless open my $fout, ">", $input_file
|
|
1758
|
0 |
0 |
if ($self->[9]) { }
|
|
1763
|
0 |
0 |
if (ref $routput_string eq 'SCALAR') { }
|
|
1764
|
0 |
0 |
unless $fout->print(${$routput_string;})
|
|
1777
|
0 |
0 |
unless $fout->close
|
|
1787
|
0 |
0 |
if (not $self->[25] and defined $write_time)
|
|
1788
|
0 |
0 |
unless utime $read_time, $write_time, $input_file
|
|
1798
|
0 |
0 |
if ($delete_backup and -f $backup_name)
|
|
1802
|
0 |
0 |
if ($delete_backup > 1 and $self->[15]->get_warning_count)
|
|
1814
|
0 |
0 |
if (not -s $input_file and -s $backup_name and $delete_backup == 1) { }
|
|
1820
|
0 |
0 |
unless unlink $backup_name
|
|
1854
|
2 |
0 |
if ($uid_i != $uid_o or $gid_i != $gid_o)
|
|
1859
|
0 |
2 |
if ($in_place_modify and chown $uid_i, $gid_i, $output_file) { }
|
|
1868
|
0 |
2 |
if ($input_file_permissions != $output_file_permissions)
|
|
1890
|
2 |
0 |
unless ($in_place_modify)
|
|
1894
|
0 |
2 |
unless (chmod $output_file_permissions, $output_file)
|
|
1930
|
0 |
657 |
unless defined $rinput_string
|
|
1938
|
2 |
655 |
unless (length ${$rinput_string;})
|
|
1945
|
0 |
657 |
if ($input_file eq "-")
|
|
1949
|
0 |
0 |
if ($size_in_mb > $maximum_file_size_mb)
|
|
1975
|
2 |
655 |
if (is_char_mode(${$rinput_string;})) { }
|
|
|
0 |
655 |
elsif (not $rOpts_character_encoding or $rOpts_character_encoding eq 'none') { }
|
|
|
646 |
9 |
elsif (lc $rOpts_character_encoding eq 'guess') { }
|
|
2003
|
2 |
644 |
unless ($is_pure_ascii_data)
|
|
2006
|
0 |
646 |
if ($decoder and ref $decoder) { }
|
|
2008
|
0 |
0 |
if ($encoding_in ne 'UTF-8' and $encoding_in ne 'utf8') { }
|
|
2017
|
0 |
0 |
if (not eval {
|
|
2051
|
0 |
9 |
if (not eval {
|
|
2083
|
11 |
646 |
$encoding_in ? :
|
|
2087
|
11 |
646 |
if ($is_encoded_data)
|
|
2093
|
11 |
646 |
$encoding_in ? :
|
|
2099
|
11 |
646 |
if ($is_encoded_data)
|
|
2103
|
0 |
11 |
unless (defined $loaded_unicode_gcstring)
|
|
2104
|
0 |
0 |
if (eval {
|
|
2109
|
0 |
0 |
if ($rOpts->{'use-unicode-gcstring'})
|
|
2122
|
0 |
11 |
if ($loaded_unicode_gcstring)
|
|
2165
|
4 |
653 |
if ($ole)
|
|
2175
|
0 |
4 |
unless ($line_separator_default)
|
|
2184
|
0 |
4 |
if ($rOpts->{$opt_ple})
|
|
2211
|
654 |
3 |
if ($str)
|
|
2213
|
654 |
0 |
if ($str =~ /(($CR|$LF)+)/) { }
|
|
2218
|
4 |
650 |
if ($test =~ /^($CRLF)+\z/) { }
|
|
|
0 |
650 |
elsif ($test =~ /^($CR)+\z/) { }
|
|
|
650 |
0 |
elsif ($test =~ /^($LF)+\z/) { }
|
|
2240
|
654 |
3 |
if (defined $input_line_separator)
|
|
2243
|
0 |
654 |
if ($rOpts->{'preserve-line-endings'})
|
|
2248
|
4 |
650 |
if ($input_line_separator ne "\n")
|
|
2252
|
0 |
4 |
if ($input_line_separator eq $CR) { }
|
|
|
4 |
0 |
elsif ($input_line_separator eq $CRLF and "\n" eq $LF) { }
|
|
2255
|
0 |
0 |
if (@lines == 1)
|
|
2259
|
0 |
0 |
if (@lines > 1)
|
|
2331
|
654 |
3 |
if ($source_stream) { }
|
|
|
0 |
3 |
elsif ($input_file eq '-') { }
|
|
2340
|
653 |
1 |
unless (defined $logfile_stream)
|
|
2345
|
653 |
1 |
unless (defined $teefile_stream)
|
|
2348
|
652 |
2 |
unless (defined $debugfile_stream)
|
|
2360
|
0 |
3 |
unless (-e $input_file)
|
|
2365
|
0 |
3 |
unless (-f $input_file)
|
|
2374
|
0 |
3 |
unless (-s $input_file)
|
|
2384
|
0 |
3 |
if ($size_in_mb > $maximum_file_size_mb)
|
|
2392
|
0 |
0 |
unless (-T $input_file or $rOpts->{'force-read-binary'})
|
|
2401
|
0 |
3 |
if ($in_place_modify and not -w $input_file)
|
|
2403
|
0 |
0 |
if (defined $backup_method and $backup_method eq "copy")
|
|
2415
|
0 |
3 |
if ($Perl::Tidy::OSNAME eq "VMS")
|
|
2421
|
0 |
3 |
if (defined $rOpts->{'output-path'})
|
|
2425
|
0 |
0 |
unless (-d $new_path)
|
|
2426
|
0 |
0 |
unless mkdir $new_path
|
|
2432
|
0 |
0 |
unless ($fileroot)
|
|
2446
|
0 |
3 |
if (not $source_stream and $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS')
|
|
2467
|
0 |
657 |
unless defined $rinput_string
|
|
2473
|
0 |
657 |
if (${$rinput_string;} =~ /^\s*<[^<>]/)
|
|
2475
|
0 |
0 |
if (is_not_perl($rinput_string, $input_file, $is_named_file))
|
|
2484
|
0 |
657 |
if $diagnostics_object
|
|
2497
|
0 |
657 |
if (defined $output_file and length $output_file) { }
|
|
|
1 |
656 |
elsif ($rOpts->{'standard-output'}) { }
|
|
|
656 |
0 |
elsif ($destination_stream) { }
|
|
|
0 |
0 |
elsif ($source_stream) { }
|
|
|
0 |
0 |
elsif ($input_file eq '-') { }
|
|
2499
|
0 |
0 |
if ($number_of_files > 1)
|
|
2503
|
0 |
0 |
if ($rOpts->{'standard-output'})
|
|
2506
|
0 |
0 |
if ($saw_pbp)
|
|
2514
|
0 |
0 |
if ($destination_stream)
|
|
2520
|
0 |
0 |
if (defined $rOpts->{'output-path'})
|
|
2524
|
0 |
0 |
if (defined $rOpts->{'output-file-extension'})
|
|
2531
|
0 |
0 |
if (@input_file_stat and $output_file eq $input_file)
|
|
2536
|
0 |
1 |
if ($destination_stream)
|
|
2540
|
0 |
0 |
if $saw_pbp
|
|
2546
|
1 |
0 |
if ($number_of_files <= 1) { }
|
|
2566
|
0 |
0 |
if ($in_place_modify) { }
|
|
2577
|
0 |
11 |
if ($is_encoded_data and $self->[26])
|
|
2590
|
641 |
16 |
if ($errorfile_stream)
|
|
2592
|
654 |
3 |
if ($logfile_stream)
|
|
2605
|
655 |
2 |
if $encoding_log_message
|
|
2609
|
0 |
657 |
if (${$rpending_logfile_message;})
|
|
2612
|
0 |
657 |
if (${$rpending_complaint;})
|
|
2639
|
656 |
1 |
if ($rOpts->{'format'} eq "tidy" and defined $routput_string)
|
|
2654
|
657 |
0 |
if $logger_object
|
|
2682
|
0 |
656 |
if ($in_place_modify) { }
|
|
|
651 |
5 |
elsif (ref $output_file) { }
|
|
2686
|
0 |
0 |
unless ($self->[24])
|
|
2694
|
0 |
0 |
if (defined $backup_method and $backup_method eq 'copy') { }
|
|
2731
|
1 |
4 |
if ($output_file eq '-') { }
|
|
2733
|
1 |
0 |
if ($is_encoded_data) { }
|
|
2742
|
4 |
0 |
if (open my $fh, '>', $output_file) { }
|
|
2743
|
3 |
1 |
if ($is_encoded_data) { }
|
|
2746
|
0 |
4 |
unless $fh->close
|
|
2753
|
4 |
0 |
if ($output_file and -f $output_file and not -l $output_file)
|
|
2754
|
2 |
2 |
if (@{$rinput_file_stat;})
|
|
2762
|
4 |
1 |
if ($is_encoded_data)
|
|
2807
|
0 |
657 |
unless (defined $rinput_string)
|
|
2810
|
0 |
657 |
if (ref $rinput_string ne "SCALAR")
|
|
2829
|
656 |
1 |
if ($rOpts->{'format'} eq "tidy")
|
|
2835
|
1 |
655 |
if ($line_tidy_begin)
|
|
2840
|
0 |
1 |
if ($line_tidy_begin > $num) { }
|
|
2847
|
0 |
1 |
if (not defined $line_tidy_end or $line_tidy_end > $num)
|
|
2862
|
2 |
654 |
if ($rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'} or $rOpts->{'backup-and-modify-in-place'})
|
|
2884
|
1 |
656 |
if ($prefilter)
|
|
2897
|
1 |
656 |
if ($rOpts->{'format'} ne "tidy")
|
|
2905
|
1 |
655 |
if ($postfilter)
|
|
2910
|
2 |
654 |
if (defined $digest_input)
|
|
2918
|
0 |
656 |
if ($rOpts->{'assert-tidy'})
|
|
2919
|
0 |
0 |
if ($self->[25])
|
|
2931
|
0 |
656 |
if ($rOpts->{'assert-untidy'})
|
|
2932
|
0 |
0 |
unless ($self->[25])
|
|
2942
|
1 |
655 |
if (@input_lines_pre or @input_lines_post)
|
|
2952
|
1 |
655 |
if ($chomp_terminal_newline)
|
|
2962
|
0 |
656 |
if ($self->[12] ne "\n")
|
|
2969
|
0 |
0 |
if (chomp $line)
|
|
3017
|
2 |
655 |
if ($rOpts->{'DEBUG'})
|
|
3027
|
0 |
656 |
if ($rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'} or $rOpts->{'tee-side-comments'})
|
|
3034
|
0 |
1 |
unless ($fh_tee)
|
|
3045
|
656 |
1 |
if ($rOpts->{'format'} eq "tidy")
|
|
3052
|
0 |
656 |
if (not defined $max_iterations or $max_iterations <= 0)
|
|
3058
|
0 |
656 |
if ($max_iterations > 6)
|
|
3063
|
3 |
653 |
if ($max_iterations > 1)
|
|
3092
|
2 |
657 |
if ($iter > 1)
|
|
3094
|
0 |
2 |
if $debugger_object
|
|
3097
|
0 |
0 |
if ($fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-")
|
|
3102
|
0 |
0 |
unless $fh_tee->close
|
|
3117
|
0 |
659 |
if ($user_formatter) { }
|
|
|
1 |
658 |
elsif ($rOpts->{'format'} eq 'html') { }
|
|
|
658 |
0 |
elsif ($rOpts->{'format'} eq 'tidy') { }
|
|
3156
|
0 |
659 |
unless ($formatter)
|
|
3182
|
5 |
0 |
if ($max_iterations > 1 and not defined $iteration_of_formatter_convergence and $formatter->can("get_convergence_check"))
|
|
3186
|
3 |
2 |
if ($formatter->get_convergence_check)
|
|
3194
|
4 |
655 |
if ($iter < $max_iterations)
|
|
3202
|
0 |
4 |
if ($stop_now) { }
|
|
3215
|
3 |
1 |
if (not defined $saw_md5{$digest}) { }
|
|
|
0 |
1 |
elsif ($iter == 1 and not $stop_now and $formatter->can('want_second_iteration') and $formatter->want_second_iteration) { }
|
|
3235
|
0 |
1 |
if ($saw_md5{$digest} != $iterm) { }
|
|
3250
|
0 |
0 |
if $diagnostics_object
|
|
3262
|
0 |
1 |
if $diagnostics_object and $iterm > 2
|
|
3270
|
2 |
2 |
if ($stop_now)
|
|
3307
|
2 |
655 |
if $debugger_object
|
|
3309
|
0 |
0 |
if ($fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-")
|
|
3314
|
0 |
0 |
unless $fh_tee->close
|
|
3320
|
1 |
656 |
if $convergence_log_message
|
|
3346
|
659 |
0 |
if ($formatter->can("finish_formatting"))
|
|
3366
|
0 |
651 |
if (ref $routput eq 'ARRAY') { }
|
|
|
651 |
0 |
elsif (ref $routput eq 'SCALAR') { }
|
|
3383
|
651 |
0 |
if ($ref_destination_stream eq 'SCALAR' or $ref_destination_stream eq 'ARRAY') { }
|
|
|
0 |
0 |
elsif ($ref_destination_stream->can('print')) { }
|
|
3404
|
6 |
645 |
if ($encode_destination_buffer)
|
|
3406
|
0 |
6 |
if (not eval {
|
|
3426
|
648 |
3 |
if ($ref_destination_stream eq 'SCALAR') { }
|
|
|
3 |
0 |
elsif (defined $destination_buffer) { }
|
|
3431
|
3 |
0 |
if ($ref_destination_stream eq 'ARRAY') { }
|
|
3440
|
0 |
0 |
if ($ref_destination_stream->can("close"))
|
|
3469
|
0 |
0 |
if (defined $s1 and defined $s2)
|
|
3475
|
0 |
0 |
if ($pos1 < 0)
|
|
3500
|
0 |
0 |
ref $string_i ? :
|
|
3501
|
0 |
0 |
ref $string_o ? :
|
|
3503
|
0 |
0 |
unless (defined $max_diff_count)
|
|
3507
|
0 |
0 |
if (defined $rbufi)
|
|
3511
|
0 |
0 |
if (defined $rbufo)
|
|
3521
|
0 |
0 |
unless $leni and $leno
|
|
3525
|
0 |
0 |
if (length $str > $lenmax)
|
|
3543
|
0 |
0 |
if ($linei eq $lineo)
|
|
3544
|
0 |
0 |
if (length $linei)
|
|
3559
|
0 |
0 |
if ($linei =~ /^(\s+)/)
|
|
3560
|
0 |
0 |
if ($lineo =~ /^(\s+)/)
|
|
3561
|
0 |
0 |
if ($leading_ws_i ne $leading_ws_o) { }
|
|
3563
|
0 |
0 |
if ($leading_ws_i =~ /\t/)
|
|
3570
|
0 |
0 |
if ($linei =~ /(\s+)$/)
|
|
3571
|
0 |
0 |
if ($lineo =~ /(\s+)$/)
|
|
3572
|
0 |
0 |
if ($trailing_ws_i ne $trailing_ws_o)
|
|
3579
|
0 |
0 |
if ($pos1 > 60)
|
|
3589
|
0 |
0 |
if ($last_nonblank_line)
|
|
3601
|
0 |
0 |
if $diff_count >= $max_diff_count
|
|
3604
|
0 |
0 |
if ($diff_count)
|
|
3609
|
0 |
0 |
if ($nlines_i > $nlines_o) { }
|
|
|
0 |
0 |
elsif ($nlines_i < $nlines_o) { }
|
|
3645
|
0 |
657 |
if ($Windows_type)
|
|
3650
|
649 |
8 |
if (defined $config_file)
|
|
3656
|
0 |
657 |
if ($rOpts->{'show-options'})
|
|
3770
|
212875 |
0 |
if ($short_name)
|
|
3771
|
0 |
212875 |
if ($expansion{$short_name})
|
|
3778
|
108730 |
104145 |
if ($flag eq "!")
|
|
3781
|
0 |
108730 |
if ($expansion{$nshort_name})
|
|
4206
|
51745 |
217460 |
unless (defined $option_category{$long_name})
|
|
4207
|
655 |
51090 |
if ($long_name =~ /^html-linked/) { }
|
|
|
655 |
50435 |
elsif ($long_name =~ /^pod2html/) { }
|
|
4398
|
44540 |
3275 |
if (defined $val)
|
|
4408
|
196500 |
72705 |
if substr($opt, -2, 2) ne "=s"
|
|
4714
|
7 |
650 |
if ($use_cache) { }
|
|
4716
|
2 |
5 |
if (my $result = $process_command_line_cache{$cache_key}) { }
|
|
4724
|
5 |
0 |
if $retvals[0]{'memoize'}
|
|
4752
|
655 |
0 |
if (eval {
|
|
4754
|
0 |
655 |
if (not $ok and 0)
|
|
4772
|
655 |
0 |
if ($dump_options_type ne "perltidyrc")
|
|
4775
|
0 |
655 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
4795
|
6 |
15 |
if ($i =~ /^-(npro|noprofile|nopro|no-profile)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-profile|dpro)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(pro|profile)=(.+)/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(pro|profile)=?$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(?: help | [ h \? ] )$/xi) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(version|v)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-defaults|ddf)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-integer-option-range|dior)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-long-names|dln)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-short-names|dsn)$/) { }
|
|
|
0 |
15 |
elsif ($i =~ /^-(dump-token-types|dtt)$/) { }
|
|
4804
|
0 |
0 |
if (defined $config_file)
|
|
4812
|
0 |
0 |
if (defined $config_file)
|
|
4813
|
0 |
0 |
if (my($start_dir, $search_file) = $config_file =~ m[^(.*)\.\.\./(.*)$])
|
|
4816
|
0 |
0 |
unless $start_dir
|
|
4820
|
0 |
0 |
if (defined $found_file)
|
|
4825
|
0 |
0 |
unless (-e $config_file)
|
|
4880
|
0 |
655 |
if ($saw_dump_profile and $saw_ignore_profile)
|
|
4888
|
649 |
6 |
unless ($saw_ignore_profile)
|
|
4893
|
649 |
0 |
if ($perltidyrc_stream)
|
|
4894
|
0 |
649 |
if (defined $config_file) { }
|
|
4910
|
0 |
649 |
unless (defined $config_file)
|
|
4918
|
649 |
0 |
if (defined $config_file)
|
|
4920
|
0 |
649 |
unless (defined $rconfig_string)
|
|
4930
|
0 |
649 |
if ($saw_dump_profile)
|
|
4936
|
649 |
0 |
if (defined $rconfig_string)
|
|
4940
|
0 |
649 |
if $death_message
|
|
4944
|
275 |
374 |
if (@{$rconfig_list;})
|
|
4953
|
0 |
275 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
4964
|
0 |
275 |
if (@ARGV)
|
|
4968
|
0 |
0 |
if (length $str < 70) { }
|
|
4969
|
0 |
0 |
if ($str)
|
|
5028
|
0 |
6875 |
if (defined $Opts{$cmd})
|
|
5057
|
0 |
655 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
5063
|
0 |
4585 |
if ($Opts{$long_name})
|
|
5072
|
655 |
0 |
if (defined $glc)
|
|
5074
|
0 |
655 |
if (not $ok and 0)
|
|
5101
|
0 |
657 |
if ($exclude_string)
|
|
5107
|
0 |
0 |
unless ($is_excluded_word{'*'})
|
|
5119
|
0 |
657 |
if ($is_excluded_word{'*'})
|
|
5124
|
3 |
654 |
if ($input_string) { }
|
|
5136
|
4601 |
0 |
unless ($seen{$word} or $is_excluded_word{$word})
|
|
5176
|
3 |
0 |
if (defined $input_string and length $input_string)
|
|
5183
|
3 |
0 |
if ($rforced_words)
|
|
5189
|
11 |
0 |
unless ($seen{$word})
|
|
5245
|
0 |
4077 |
unless defined $test_string
|
|
5248
|
0 |
4077 |
if ($test_string =~ /[^[:print:]]/g)
|
|
5258
|
0 |
4077 |
if ($leading_dash_check{$opt_name} and substr($test_string, 0, 1) eq "-")
|
|
5262
|
0 |
0 |
if ($opt_name eq "outfile" or $opt_name eq "output_path")
|
|
5271
|
0 |
4077 |
if ($leading_space_check{$opt_name} and $test_string =~ /^\s/)
|
|
5276
|
0 |
4077 |
if ($trailing_space_check{$opt_name} and $test_string =~ /\s$/)
|
|
5281
|
0 |
657 |
if ($message)
|
|
5310
|
0 |
657 |
unless ($encoding =~ /^\s*(?:guess|none|utf8|utf-8)\s*$/i)
|
|
5324
|
0 |
657 |
if (not defined $integer_range_check or $integer_range_check <= 0 or $integer_range_check > 3)
|
|
5331
|
657 |
0 |
if ($integer_range_check)
|
|
5335
|
3283 |
44678 |
unless defined $val
|
|
5337
|
0 |
44678 |
unless defined $range
|
|
5340
|
0 |
44678 |
if (defined $min and $val < $min)
|
|
5342
|
0 |
0 |
if ($integer_range_check < 3)
|
|
5344
|
0 |
0 |
defined $default ? :
|
|
5349
|
0 |
44678 |
if (defined $max and $val > $max)
|
|
5351
|
0 |
0 |
if ($integer_range_check < 3)
|
|
5353
|
0 |
0 |
defined $default ? :
|
|
5359
|
0 |
657 |
if ($Error_message)
|
|
5360
|
0 |
0 |
if ($integer_range_check == 1) { }
|
|
|
0 |
0 |
elsif ($integer_range_check == 2) { }
|
|
5380
|
0 |
657 |
if (defined $rOpts->{'vertical-tightness'})
|
|
5387
|
0 |
657 |
if (defined $rOpts->{'vertical-tightness-closing'})
|
|
5394
|
0 |
657 |
if (defined $rOpts->{'closing-token-indentation'})
|
|
5405
|
0 |
1314 |
if ($rOpts->{$optname})
|
|
5417
|
1274 |
1354 |
if ($rOpts->{$key})
|
|
5418
|
0 |
1274 |
if ($rOpts->{$key} < 0)
|
|
5422
|
0 |
1274 |
if ($rOpts->{$key} > $MAX_BLANK_COUNT)
|
|
5439
|
1 |
656 |
if (defined $rOpts->{'logfile-gap'} and $rOpts->{'logfile-gap'} >= 0)
|
|
5446
|
3 |
0 |
unless ($rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'} or $rOpts->{'delete-old-newlines'})
|
|
5455
|
5 |
652 |
if ($rOpts->{'indent-spaced-block-comments'})
|
|
5460
|
3 |
654 |
if ($rOpts->{'opening-brace-always-on-right'})
|
|
5462
|
0 |
3 |
if ($rOpts->{'opening-brace-on-new-line'})
|
|
5469
|
0 |
3 |
if ($rOpts->{'brace-left-and-indent'})
|
|
5479
|
633 |
24 |
unless (defined $rOpts->{'opening-brace-on-new-line'})
|
|
5483
|
2 |
655 |
if ($rOpts->{'entab-leading-whitespace'})
|
|
5484
|
0 |
2 |
if ($rOpts->{'entab-leading-whitespace'} < 0)
|
|
5490
|
1 |
1 |
if ($rOpts->{'tabs'})
|
|
5504
|
657 |
0 |
if ($rOpts->{'default-tabsize'}) { }
|
|
5505
|
0 |
657 |
if ($rOpts->{'default-tabsize'} < 0)
|
|
5509
|
0 |
657 |
if ($rOpts->{'default-tabsize'} > $MAX_DEFAULT_TABSIZE)
|
|
5521
|
3 |
654 |
if (defined $rOpts->{'sub-alias-list'} and length $rOpts->{'sub-alias-list'})
|
|
5538
|
6 |
651 |
unless ($rOpts->{'fuzzy-line-length'})
|
|
5539
|
0 |
6 |
if ($rOpts->{'maximum-line-length'} != 1 or $rOpts->{'continuation-indentation'} != 0)
|
|
5547
|
0 |
657 |
if ($rOpts->{'short-concatenation-item-length'} > 12)
|
|
5558
|
4 |
653 |
if ($rOpts->{'freeze-whitespace'})
|
|
5568
|
1 |
656 |
if ($line_range_tidy)
|
|
5570
|
0 |
1 |
if ($num_files > 1)
|
|
5577
|
1 |
0 |
if ($line_range_tidy =~ /^(\d+):(\d+)?$/) { }
|
|
5580
|
0 |
1 |
if ($n1 < 1)
|
|
5585
|
0 |
1 |
if (defined $n2 and $n2 < $n1)
|
|
5614
|
0 |
0 |
if (-f $try_path) { }
|
|
|
0 |
0 |
elsif ($search_dir eq '/') { }
|
|
5652
|
5 |
2888 |
if ($word =~ /^(-[-]?no)-(.*)/)
|
|
5655
|
2893 |
0 |
if ($word =~ /^-[-]?([\w\-]+)(.*)/) { }
|
|
5661
|
710 |
2183 |
if ($pass_count == 0)
|
|
5667
|
537 |
2356 |
if ($$rexpansion{$abr . $flags})
|
|
5673
|
1097 |
1796 |
if ($rexpansion->{$abr}) { }
|
|
5679
|
0 |
1613 |
unless $abbrev
|
|
5698
|
930 |
381 |
unless $abbrev_count
|
|
5701
|
0 |
381 |
if ($pass_count == $max_passes)
|
|
5709
|
0 |
0 |
if ($num < 50) { }
|
|
5721
|
0 |
0 |
if (defined $config_file) { }
|
|
5785
|
1211 |
15 |
if (substr($arg, 0, 2) eq "--" and length $arg > 2)
|
|
5788
|
0 |
1211 |
if ($arg_seeking_string_last and $arg =~ /^\-\-[A-Za-z]/)
|
|
5795
|
0 |
1211 |
if (index($arg, "=") == -1 and $$ris_string_option{substr $arg, 2})
|
|
5805
|
0 |
930 |
if ($error_message)
|
|
5807
|
0 |
0 |
defined $config_file ? :
|
|
5852
|
0 |
0 |
unless $base =~ s/;-?\d*$//
|
|
5866
|
0 |
0 |
unless $base =~ /(?:^|[^^])\./
|
|
5869
|
0 |
0 |
$base =~ /\.$/ ? :
|
|
5887
|
0 |
0 |
unless $Perl::Tidy::OSNAME =~ /win32|dos/i
|
|
5900
|
0 |
0 |
if (not $ok and 0)
|
|
5911
|
0 |
0 |
unless $id
|
|
5929
|
0 |
0 |
unless (defined $os)
|
|
5943
|
0 |
0 |
$os eq '2000' && $major != 5 ? :
|
|
5954
|
0 |
657 |
if $is_Windows
|
|
5968
|
0 |
0 |
if ($is_Windows) { }
|
|
5978
|
0 |
0 |
unless defined $config_file
|
|
5988
|
0 |
0 |
if (defined $config_file)
|
|
5989
|
0 |
0 |
if (my($start_dir, $search_file) = $config_file =~ m[^(.*)\.\.\./(.*)$])
|
|
5994
|
0 |
0 |
unless $start_dir
|
|
5997
|
0 |
0 |
if (defined $found_file)
|
|
6010
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6011
|
0 |
0 |
if ($is_Windows)
|
|
6013
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6021
|
0 |
0 |
if $Perl::Tidy::OSNAME =~ /win32/i
|
|
6026
|
0 |
0 |
if (defined $ENV{$var}) { }
|
|
6030
|
0 |
0 |
if ($var eq "PERLTIDY")
|
|
6033
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6039
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6041
|
0 |
0 |
if ($is_Windows)
|
|
6045
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6055
|
0 |
0 |
if ($is_Windows) { }
|
|
|
0 |
0 |
elsif ($Perl::Tidy::OSNAME eq 'OS2') { }
|
|
|
0 |
0 |
elsif ($Perl::Tidy::OSNAME eq 'MacOS') { }
|
|
|
0 |
0 |
elsif ($Perl::Tidy::OSNAME eq 'VMS') { }
|
|
6057
|
0 |
0 |
if ($Windows_type)
|
|
6063
|
0 |
0 |
if ($allusers)
|
|
6066
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6069
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6076
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6079
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6095
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6098
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6114
|
0 |
0 |
unless ($os)
|
|
6116
|
0 |
0 |
unless $os
|
|
6121
|
0 |
0 |
if ($os =~ /9[58]|Me/) { }
|
|
|
0 |
0 |
elsif ($os =~ /NT|XP|200?/) { }
|
|
6125
|
0 |
0 |
$os =~ /XP/ ? :
|
|
6126
|
0 |
0 |
$os =~ /NT/ ? :
|
|
6149
|
0 |
0 |
if ($rconfig_string) { }
|
|
6182
|
648 |
1 |
unless (${$rconfig_string;} =~ /^\s*---\w/m)
|
|
6191
|
3 |
1 |
if ($line and $line =~ /^\s*---(\w[\w-]*)/)
|
|
6198
|
0 |
3 |
if (not $is_known and $word =~ s/^no-?//)
|
|
6202
|
1 |
2 |
if (not $is_known) { }
|
|
6214
|
1 |
0 |
if ($change_notices)
|
|
6244
|
0 |
649 |
if ($death_message)
|
|
6255
|
0 |
523 |
unless length $line
|
|
6263
|
0 |
523 |
if ($line =~ /^(?: (\w+) \s* \{ ) (.*)? $/x) { }
|
|
|
0 |
523 |
elsif ($line =~ /^{/) { }
|
|
|
0 |
523 |
elsif ($line =~ /^(.*)?\}$/) { }
|
|
6267
|
0 |
0 |
if $opening_brace_line
|
|
6269
|
0 |
0 |
unless $body and $body =~ s/\}$//
|
|
6272
|
0 |
0 |
if ($rexpansion->{$name})
|
|
6294
|
0 |
0 |
if ($opening_brace_line) { }
|
|
6308
|
523 |
0 |
if ($body)
|
|
6311
|
0 |
523 |
if ($msg)
|
|
6320
|
0 |
523 |
if ($name) { }
|
|
6332
|
0 |
649 |
if ($opening_brace_line)
|
|
6373
|
6 |
559 |
unless length $line
|
|
6375
|
559 |
0 |
if (not $quote_char) { }
|
|
6378
|
36 |
523 |
if (substr($line, 0, 1) eq "#")
|
|
6397
|
1168 |
186 |
if (not $quote_char) { }
|
|
6399
|
93 |
1075 |
if ($in_string =~ /\G([\"\'])/cg) { }
|
|
|
32 |
1043 |
elsif ($in_string =~ /\G#/cg) { }
|
|
|
552 |
491 |
elsif ($in_string =~ /\G([^\#\'\"]+)/cg) { }
|
|
6414
|
32 |
0 |
if (not length $out_string or $out_string =~ s/\s+$//)
|
|
6433
|
93 |
93 |
if ($in_string =~ /\G($quote_char)/cg) { }
|
|
|
93 |
0 |
elsif ($in_string =~ /\G([^$quote_char]+)/cg) { }
|
|
6452
|
523 |
0 |
unless ($quote_char)
|
|
6462
|
0 |
649 |
if ($quote_char)
|
|
6464
|
0 |
0 |
if (length $quote_start_line > $max_len)
|
|
6497
|
0 |
1180 |
unless (defined $body)
|
|
6502
|
726 |
6569 |
if ($quote_char) { }
|
|
6503
|
93 |
633 |
if ($body =~ /\G($quote_char)/cg) { }
|
|
|
633 |
0 |
elsif ($body =~ /\G(.)/cg) { }
|
|
6512
|
0 |
0 |
if (length $part)
|
|
6523
|
93 |
6476 |
if ($body =~ /\G([\"\'])/cg) { }
|
|
|
181 |
6295 |
elsif ($body =~ /\G(\s+)/cg) { }
|
|
|
5115 |
1180 |
elsif ($body =~ /\G(.)/cg) { }
|
|
6527
|
181 |
0 |
if (length $part)
|
|
6534
|
535 |
645 |
if (length $part)
|
|
6578
|
0 |
0 |
unless defined $_
|
|
6608
|
260690 |
9337 |
if ($opt =~ /(.*)(!|=.*)$/)
|
|
6612
|
94332 |
175695 |
if (defined $rOpts->{$opt})
|
|
6621
|
94028 |
309 |
if ($flag)
|
|
6622
|
48601 |
45427 |
if ($flag =~ /^=/) { }
|
|
|
45427 |
0 |
elsif ($flag =~ /^!/) { }
|
|
6623
|
3394 |
45207 |
unless ($value =~ /^\d+$/)
|
|
6627
|
10614 |
34813 |
unless $value
|