| line |
true |
false |
branch |
|
165
|
0 |
0 |
if $AUTOLOAD =~ /\bDESTROY$/
|
|
213
|
0 |
636 |
if ($mode ne "w")
|
|
214
|
0 |
0 |
if ($mode ne "r")
|
|
226
|
636 |
0 |
if ($ref) { }
|
|
227
|
0 |
636 |
if ($ref eq 'ARRAY') { }
|
|
|
636 |
0 |
elsif ($ref eq 'SCALAR') { }
|
|
240
|
0 |
0 |
if ($mode eq "r")
|
|
243
|
0 |
0 |
if ($ref->can('getline')) { }
|
|
259
|
0 |
0 |
if ($mode eq "w")
|
|
262
|
0 |
0 |
if ($ref->can('print')) { }
|
|
282
|
0 |
0 |
if ($filename eq '-') { }
|
|
283
|
0 |
0 |
$mode eq 'w' ? :
|
|
295
|
0 |
636 |
if (not $fh) { }
|
|
303
|
0 |
636 |
if (ref $fh eq 'IO::File') { }
|
|
|
0 |
636 |
elsif ($filename eq '-') { }
|
|
306
|
0 |
0 |
if ($is_encoded_data) { }
|
|
310
|
0 |
0 |
if ($is_encoded_data) { }
|
|
355
|
1283 |
3 |
if ($ref) { }
|
|
356
|
2 |
1281 |
if ($ref eq 'ARRAY') { }
|
|
|
1281 |
0 |
elsif ($ref eq 'SCALAR') { }
|
|
364
|
0 |
0 |
if ($ref->can('getline')) { }
|
|
384
|
0 |
3 |
if ($filename eq '-') { }
|
|
387
|
0 |
0 |
if ($timeout_in_seconds and $timeout_in_seconds > 0) { }
|
|
388
|
0 |
0 |
unless eval {
|
|
405
|
3 |
0 |
if (open my $fh, '<', $filename) { }
|
|
408
|
0 |
3 |
unless $fh->close
|
|
466
|
0 |
0 |
$display_name ? :
|
|
473
|
0 |
0 |
if (length $nag_message and $Warn_count > 0)
|
|
510
|
0 |
0 |
if ($flag) { }
|
|
565
|
2 |
645 |
if utf8::is_utf8($string)
|
|
608
|
0 |
717 |
unless (defined $rcall_hash)
|
|
620
|
0 |
717 |
unless defined $rinput_list
|
|
621
|
717 |
0 |
$option_name ? :
|
|
628
|
0 |
1434 |
if (defined $rthing)
|
|
630
|
0 |
0 |
unless ($ref)
|
|
633
|
0 |
0 |
if ($ref eq "ARRAY")
|
|
636
|
0 |
0 |
if (ref $rthing ne "HASH")
|
|
651
|
0 |
717 |
if (defined $rvalid_words) { }
|
|
653
|
0 |
0 |
if $rexceptions and $rexceptions->{$word}
|
|
654
|
0 |
0 |
unless ($rvalid_words->{$word})
|
|
666
|
0 |
0 |
if $rexceptions and $rexceptions->{$word}
|
|
667
|
4610 |
0 |
if $word =~ /^\w+$/ and not $word =~ /^\d/
|
|
670
|
0 |
0 |
if ($allow_module_path and index $word, ":")
|
|
674
|
0 |
0 |
unless length $sub_word
|
|
675
|
0 |
0 |
if $sub_word =~ /^\w+$/ and not $sub_word =~ /^\d/
|
|
679
|
0 |
0 |
if $ok
|
|
685
|
717 |
0 |
unless @non_words
|
|
686
|
0 |
0 |
if ($on_error)
|
|
688
|
0 |
0 |
if ($on_error eq "warn" or $on_error eq "die")
|
|
692
|
0 |
0 |
if (length $str > $max_str_len - 1)
|
|
699
|
0 |
0 |
if $on_error eq "die"
|
|
731
|
0 |
0 |
if (${$rinput_string;} =~ /\s*\<\s*([\?\!]?[\-\w]+)/) { }
|
|
734
|
0 |
0 |
if $is_known_markup_word{lc $text}
|
|
737
|
0 |
0 |
unless $is_named_file
|
|
740
|
0 |
0 |
if $input_file =~ /html?$/i
|
|
878
|
0 |
647 |
if (my(@bad_keys) = grep({not exists $defaults{$_};} keys %input_hash))
|
|
898
|
0 |
2588 |
if (defined $hash_ref)
|
|
899
|
0 |
0 |
if (ref $hash_ref ne "HASH")
|
|
901
|
0 |
0 |
$what ? :
|
|
924
|
631 |
16 |
if ($stderr_stream) { }
|
|
926
|
0 |
631 |
unless ($fh_stderr)
|
|
950
|
0 |
647 |
if (defined $dump_options) { }
|
|
951
|
0 |
0 |
unless (defined $dump_options_type)
|
|
954
|
0 |
0 |
if ($dump_options_type ne "perltidyrc" and $dump_options_type ne "full")
|
|
971
|
0 |
647 |
if ($user_formatter)
|
|
979
|
647 |
0 |
if (defined $argv)
|
|
982
|
0 |
647 |
if ($rargv eq "SCALAR")
|
|
985
|
0 |
647 |
if ($rargv) { }
|
|
986
|
0 |
0 |
if ($rargv eq 'ARRAY') { }
|
|
1002
|
0 |
647 |
if ($msg)
|
|
1026
|
0 |
647 |
if ($Perl::Tidy::OSNAME eq 'VMS') { }
|
|
1038
|
9 |
638 |
if (@ARGV > 1)
|
|
1065
|
691 |
9 |
unless $_ eq "-pbp"
|
|
1076
|
0 |
647 |
if (defined $dump_getopt_flags)
|
|
1087
|
0 |
0 |
if ($opt =~ /(.*)(!|=.*|:.*)$/)
|
|
1095
|
0 |
647 |
if (defined $dump_options_category)
|
|
1100
|
0 |
647 |
if (defined $dump_abbreviations)
|
|
1105
|
0 |
647 |
if (defined $dump_options)
|
|
1110
|
0 |
647 |
if $quit_now
|
|
1116
|
0 |
647 |
if ($rOpts->{'dump-options'})
|
|
1141
|
0 |
5823 |
if ($rOpts->{$opt_name})
|
|
1143
|
0 |
0 |
if ($num_files != 1)
|
|
1148
|
0 |
0 |
if ($rOpts->{'outfile'})
|
|
1162
|
0 |
647 |
if ($user_formatter)
|
|
1176
|
647 |
0 |
$rOpts->{'encode-output-strings'} ? :
|
|
1179
|
0 |
647 |
unless (exists $default_file_extension{$rOpts->{'format'}})
|
|
1191
|
0 |
0 |
@Arg_files ? :
|
|
|
647 |
0 |
defined $source_stream ? :
|
|
1206
|
1 |
646 |
if ($rOpts->{'format'} eq "html")
|
|
1220
|
9 |
638 |
if (not $num_files and @ARGV_saved > 1)
|
|
1223
|
0 |
0 |
if ($opt_test =~ s/^[-]+// and not $file_test =~ /^[-]/ and not $file_test =~ /^\d+$/ and -e $file_test)
|
|
1236
|
0 |
0 |
if (not $exp) { }
|
|
|
0 |
0 |
elsif (@{$exp;} == 1) { }
|
|
1241
|
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})
|
|
1258
|
647 |
0 |
if ($output_extension)
|
|
1262
|
0 |
647 |
if ($in_place_modify and $backup_extension)
|
|
1276
|
647 |
0 |
if ($source_stream) { }
|
|
|
0 |
0 |
elsif (not @Arg_files) { }
|
|
1277
|
0 |
647 |
if (@Arg_files > 0)
|
|
1288
|
3 |
644 |
unless ref $source_stream
|
|
1300
|
0 |
0 |
if (-e $input_file) { }
|
|
1306
|
0 |
0 |
if ($input_file =~ /([\?\*\[\{])/)
|
|
1310
|
0 |
0 |
if ($ifile =~ /^\'(.+)\'$/)
|
|
1311
|
0 |
0 |
if ($ifile =~ /^\"(.+)\"$/)
|
|
1314
|
0 |
0 |
if (opendir $dh, "./")
|
|
1316
|
0 |
0 |
if /$pattern/
|
|
1318
|
0 |
0 |
unless @files
|
|
1329
|
0 |
0 |
unless (@Arg_files)
|
|
1339
|
647 |
0 |
unless ($rOpts->{'use-unicode-gcstring'})
|
|
1346
|
0 |
647 |
if (@Arg_files > 1)
|
|
1353
|
0 |
0 |
if (@Arg_files > 1 and $rOpts->{'file-size-order'})
|
|
1357
|
0 |
0 |
-e $_ ? :
|
|
1412
|
0 |
647 |
$Warn_count ? :
|
|
1414
|
0 |
647 |
wantarray ? :
|
|
1416
|
0 |
0 |
wantarray ? :
|
|
1433
|
649 |
0 |
unless defined $extension
|
|
1438
|
649 |
0 |
if (length $extension == 0)
|
|
1440
|
0 |
649 |
unless defined $extension
|
|
1447
|
649 |
0 |
if ($extension =~ /^[a-zA-Z0-9]/)
|
|
1474
|
2 |
645 |
if ($in_place_modify)
|
|
1475
|
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'}) { }
|
|
1491
|
0 |
0 |
if (not $rOpts_in_profile->{'backup-and-modify-in-place'}) { }
|
|
|
0 |
0 |
elsif ($rOpts_in_profile->{'standard-output'}) { }
|
|
1511
|
0 |
647 |
if ($in_place_modify)
|
|
1532
|
0 |
0 |
if ($delete_backup > 1)
|
|
1542
|
0 |
647 |
if (defined $backup_method and $backup_method ne "copy" and $backup_method ne "move")
|
|
1571
|
0 |
0 |
unless (-f $input_file)
|
|
1580
|
0 |
0 |
if (-f $backup_file)
|
|
1581
|
0 |
0 |
unless unlink $backup_file
|
|
1588
|
0 |
0 |
unless File::Copy::copy($input_file, $backup_file)
|
|
1599
|
0 |
0 |
if (defined $write_time)
|
|
1600
|
0 |
0 |
unless utime $read_time, $write_time, $backup_file
|
|
1606
|
0 |
0 |
unless open my $fout, ">", $input_file
|
|
1611
|
0 |
0 |
if ($self->[9]) { }
|
|
1616
|
0 |
0 |
if (ref $routput_string eq 'SCALAR') { }
|
|
1617
|
0 |
0 |
unless $fout->print(${$routput_string;})
|
|
1630
|
0 |
0 |
unless $fout->close
|
|
1640
|
0 |
0 |
if (not $self->[25] and defined $write_time)
|
|
1641
|
0 |
0 |
unless utime $read_time, $write_time, $input_file
|
|
1651
|
0 |
0 |
if ($delete_backup and -f $backup_file)
|
|
1655
|
0 |
0 |
if ($delete_backup > 1 and $self->[15]->get_warning_count)
|
|
1667
|
0 |
0 |
if (not -s $input_file and -s $backup_file and $delete_backup == 1) { }
|
|
1673
|
0 |
0 |
unless unlink $backup_file
|
|
1713
|
0 |
0 |
unless (-f $input_file)
|
|
1721
|
0 |
0 |
if (-f $backup_name)
|
|
1722
|
0 |
0 |
unless unlink $backup_name
|
|
1732
|
0 |
0 |
if (-l $input_file) { }
|
|
1733
|
0 |
0 |
unless File::Copy::copy($input_file, $backup_name)
|
|
1737
|
0 |
0 |
unless rename $input_file, $backup_name
|
|
1744
|
0 |
0 |
unless open my $fout, ">", $input_file
|
|
1749
|
0 |
0 |
if ($self->[9]) { }
|
|
1754
|
0 |
0 |
if (ref $routput_string eq 'SCALAR') { }
|
|
1755
|
0 |
0 |
unless $fout->print(${$routput_string;})
|
|
1768
|
0 |
0 |
unless $fout->close
|
|
1778
|
0 |
0 |
if (not $self->[25] and defined $write_time)
|
|
1779
|
0 |
0 |
unless utime $read_time, $write_time, $input_file
|
|
1789
|
0 |
0 |
if ($delete_backup and -f $backup_name)
|
|
1793
|
0 |
0 |
if ($delete_backup > 1 and $self->[15]->get_warning_count)
|
|
1805
|
0 |
0 |
if (not -s $input_file and -s $backup_name and $delete_backup == 1) { }
|
|
1811
|
0 |
0 |
unless unlink $backup_name
|
|
1845
|
2 |
0 |
if ($uid_i != $uid_o or $gid_i != $gid_o)
|
|
1850
|
0 |
2 |
if ($in_place_modify and chown $uid_i, $gid_i, $output_file) { }
|
|
1859
|
0 |
2 |
if ($input_file_permissions != $output_file_permissions)
|
|
1881
|
2 |
0 |
unless ($in_place_modify)
|
|
1885
|
0 |
2 |
unless (chmod $output_file_permissions, $output_file)
|
|
1921
|
0 |
647 |
unless defined $rinput_string
|
|
1929
|
2 |
645 |
unless (length ${$rinput_string;})
|
|
1936
|
0 |
647 |
if ($input_file eq "-")
|
|
1940
|
0 |
0 |
if ($size_in_mb > $maximum_file_size_mb)
|
|
1966
|
2 |
645 |
if (is_char_mode(${$rinput_string;})) { }
|
|
|
0 |
645 |
elsif (not $rOpts_character_encoding or $rOpts_character_encoding eq 'none') { }
|
|
|
636 |
9 |
elsif (lc $rOpts_character_encoding eq 'guess') { }
|
|
1994
|
2 |
634 |
unless ($is_pure_ascii_data)
|
|
1997
|
0 |
636 |
if ($decoder and ref $decoder) { }
|
|
1999
|
0 |
0 |
if ($encoding_in ne 'UTF-8' and $encoding_in ne 'utf8') { }
|
|
2008
|
0 |
0 |
if (not eval {
|
|
2042
|
0 |
9 |
if (not eval {
|
|
2074
|
11 |
636 |
$encoding_in ? :
|
|
2078
|
11 |
636 |
if ($is_encoded_data)
|
|
2084
|
11 |
636 |
$encoding_in ? :
|
|
2090
|
11 |
636 |
if ($is_encoded_data)
|
|
2094
|
0 |
11 |
unless (defined $loaded_unicode_gcstring)
|
|
2095
|
0 |
0 |
if (eval {
|
|
2100
|
0 |
0 |
if ($rOpts->{'use-unicode-gcstring'})
|
|
2113
|
0 |
11 |
if ($loaded_unicode_gcstring)
|
|
2156
|
4 |
643 |
if ($ole)
|
|
2166
|
0 |
4 |
unless ($line_separator_default)
|
|
2175
|
0 |
4 |
if ($rOpts->{$opt_ple})
|
|
2202
|
644 |
3 |
if ($str)
|
|
2204
|
644 |
0 |
if ($str =~ /(($CR|$LF)+)/) { }
|
|
2209
|
4 |
640 |
if ($test =~ /^($CRLF)+\z/) { }
|
|
|
0 |
640 |
elsif ($test =~ /^($CR)+\z/) { }
|
|
|
640 |
0 |
elsif ($test =~ /^($LF)+\z/) { }
|
|
2231
|
644 |
3 |
if (defined $input_line_separator)
|
|
2234
|
0 |
644 |
if ($rOpts->{'preserve-line-endings'})
|
|
2239
|
4 |
640 |
if ($input_line_separator ne "\n")
|
|
2243
|
0 |
4 |
if ($input_line_separator eq $CR) { }
|
|
|
4 |
0 |
elsif ($input_line_separator eq $CRLF and "\n" eq $LF) { }
|
|
2246
|
0 |
0 |
if (@lines == 1)
|
|
2250
|
0 |
0 |
if (@lines > 1)
|
|
2322
|
644 |
3 |
if ($source_stream) { }
|
|
|
0 |
3 |
elsif ($input_file eq '-') { }
|
|
2331
|
643 |
1 |
unless (defined $logfile_stream)
|
|
2336
|
643 |
1 |
unless (defined $teefile_stream)
|
|
2339
|
642 |
2 |
unless (defined $debugfile_stream)
|
|
2351
|
0 |
3 |
unless (-e $input_file)
|
|
2356
|
0 |
3 |
unless (-f $input_file)
|
|
2365
|
0 |
3 |
unless (-s $input_file)
|
|
2375
|
0 |
3 |
if ($size_in_mb > $maximum_file_size_mb)
|
|
2383
|
0 |
0 |
unless (-T $input_file or $rOpts->{'force-read-binary'})
|
|
2392
|
0 |
3 |
if ($in_place_modify and not -w $input_file)
|
|
2394
|
0 |
0 |
if (defined $backup_method and $backup_method eq "copy")
|
|
2406
|
0 |
3 |
if ($Perl::Tidy::OSNAME eq "VMS")
|
|
2412
|
0 |
3 |
if (defined $rOpts->{'output-path'})
|
|
2416
|
0 |
0 |
unless (-d $new_path)
|
|
2417
|
0 |
0 |
unless mkdir $new_path
|
|
2423
|
0 |
0 |
unless ($fileroot)
|
|
2437
|
0 |
3 |
if (not $source_stream and $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS')
|
|
2458
|
0 |
647 |
unless defined $rinput_string
|
|
2464
|
0 |
647 |
if (${$rinput_string;} =~ /^\s*<[^<>]/)
|
|
2466
|
0 |
0 |
if (is_not_perl($rinput_string, $input_file, $is_named_file))
|
|
2475
|
0 |
647 |
if $diagnostics_object
|
|
2488
|
0 |
647 |
if (defined $output_file and length $output_file) { }
|
|
|
1 |
646 |
elsif ($rOpts->{'standard-output'}) { }
|
|
|
646 |
0 |
elsif ($destination_stream) { }
|
|
|
0 |
0 |
elsif ($source_stream) { }
|
|
|
0 |
0 |
elsif ($input_file eq '-') { }
|
|
2490
|
0 |
0 |
if ($number_of_files > 1)
|
|
2494
|
0 |
0 |
if ($rOpts->{'standard-output'})
|
|
2497
|
0 |
0 |
if ($saw_pbp)
|
|
2505
|
0 |
0 |
if ($destination_stream)
|
|
2511
|
0 |
0 |
if (defined $rOpts->{'output-path'})
|
|
2515
|
0 |
0 |
if (defined $rOpts->{'output-file-extension'})
|
|
2522
|
0 |
0 |
if (@input_file_stat and $output_file eq $input_file)
|
|
2527
|
0 |
1 |
if ($destination_stream)
|
|
2531
|
0 |
0 |
if $saw_pbp
|
|
2537
|
1 |
0 |
if ($number_of_files <= 1) { }
|
|
2557
|
0 |
0 |
if ($in_place_modify) { }
|
|
2568
|
0 |
11 |
if ($is_encoded_data and $self->[26])
|
|
2581
|
631 |
16 |
if ($errorfile_stream)
|
|
2583
|
644 |
3 |
if ($logfile_stream)
|
|
2596
|
645 |
2 |
if $encoding_log_message
|
|
2600
|
0 |
647 |
if (${$rpending_logfile_message;})
|
|
2603
|
0 |
647 |
if (${$rpending_complaint;})
|
|
2630
|
646 |
1 |
if ($rOpts->{'format'} eq "tidy" and defined $routput_string)
|
|
2645
|
647 |
0 |
if $logger_object
|
|
2673
|
0 |
646 |
if ($in_place_modify) { }
|
|
|
641 |
5 |
elsif (ref $output_file) { }
|
|
2677
|
0 |
0 |
unless ($self->[24])
|
|
2685
|
0 |
0 |
if (defined $backup_method and $backup_method eq 'copy') { }
|
|
2722
|
1 |
4 |
if ($output_file eq '-') { }
|
|
2724
|
1 |
0 |
if ($is_encoded_data) { }
|
|
2733
|
4 |
0 |
if (open my $fh, '>', $output_file) { }
|
|
2734
|
3 |
1 |
if ($is_encoded_data) { }
|
|
2737
|
0 |
4 |
unless $fh->close
|
|
2744
|
4 |
0 |
if ($output_file and -f $output_file and not -l $output_file)
|
|
2745
|
2 |
2 |
if (@{$rinput_file_stat;})
|
|
2753
|
4 |
1 |
if ($is_encoded_data)
|
|
2798
|
0 |
647 |
unless (defined $rinput_string)
|
|
2801
|
0 |
647 |
if (ref $rinput_string ne "SCALAR")
|
|
2820
|
646 |
1 |
if ($rOpts->{'format'} eq "tidy")
|
|
2826
|
1 |
645 |
if ($line_tidy_begin)
|
|
2831
|
0 |
1 |
if ($line_tidy_begin > $num) { }
|
|
2838
|
0 |
1 |
if (not defined $line_tidy_end or $line_tidy_end > $num)
|
|
2853
|
2 |
644 |
if ($rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'} or $rOpts->{'backup-and-modify-in-place'})
|
|
2875
|
1 |
646 |
if ($prefilter)
|
|
2888
|
1 |
646 |
if ($rOpts->{'format'} ne "tidy")
|
|
2896
|
1 |
645 |
if ($postfilter)
|
|
2901
|
2 |
644 |
if (defined $digest_input)
|
|
2909
|
0 |
646 |
if ($rOpts->{'assert-tidy'})
|
|
2910
|
0 |
0 |
if ($self->[25])
|
|
2922
|
0 |
646 |
if ($rOpts->{'assert-untidy'})
|
|
2923
|
0 |
0 |
unless ($self->[25])
|
|
2933
|
1 |
645 |
if (@input_lines_pre or @input_lines_post)
|
|
2943
|
1 |
645 |
if ($chomp_terminal_newline)
|
|
2953
|
0 |
646 |
if ($self->[12] ne "\n")
|
|
2960
|
0 |
0 |
if (chomp $line)
|
|
3008
|
2 |
645 |
if ($rOpts->{'DEBUG'})
|
|
3018
|
0 |
646 |
if ($rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'} or $rOpts->{'tee-side-comments'})
|
|
3025
|
0 |
1 |
unless ($fh_tee)
|
|
3036
|
646 |
1 |
if ($rOpts->{'format'} eq "tidy")
|
|
3043
|
0 |
646 |
if (not defined $max_iterations or $max_iterations <= 0)
|
|
3049
|
0 |
646 |
if ($max_iterations > 6)
|
|
3054
|
3 |
643 |
if ($max_iterations > 1)
|
|
3083
|
2 |
647 |
if ($iter > 1)
|
|
3085
|
0 |
2 |
if $debugger_object
|
|
3088
|
0 |
0 |
if ($fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-")
|
|
3093
|
0 |
0 |
unless $fh_tee->close
|
|
3108
|
0 |
649 |
if ($user_formatter) { }
|
|
|
1 |
648 |
elsif ($rOpts->{'format'} eq 'html') { }
|
|
|
648 |
0 |
elsif ($rOpts->{'format'} eq 'tidy') { }
|
|
3147
|
0 |
649 |
unless ($formatter)
|
|
3173
|
5 |
0 |
if ($max_iterations > 1 and not defined $iteration_of_formatter_convergence and $formatter->can("get_convergence_check"))
|
|
3177
|
3 |
2 |
if ($formatter->get_convergence_check)
|
|
3185
|
4 |
645 |
if ($iter < $max_iterations)
|
|
3193
|
0 |
4 |
if ($stop_now) { }
|
|
3206
|
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) { }
|
|
3226
|
0 |
1 |
if ($saw_md5{$digest} != $iterm) { }
|
|
3241
|
0 |
0 |
if $diagnostics_object
|
|
3253
|
0 |
1 |
if $diagnostics_object and $iterm > 2
|
|
3261
|
2 |
2 |
if ($stop_now)
|
|
3298
|
2 |
645 |
if $debugger_object
|
|
3300
|
0 |
0 |
if ($fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-")
|
|
3305
|
0 |
0 |
unless $fh_tee->close
|
|
3311
|
1 |
646 |
if $convergence_log_message
|
|
3337
|
649 |
0 |
if ($formatter->can("finish_formatting"))
|
|
3357
|
0 |
641 |
if (ref $routput eq 'ARRAY') { }
|
|
|
641 |
0 |
elsif (ref $routput eq 'SCALAR') { }
|
|
3374
|
641 |
0 |
if ($ref_destination_stream eq 'SCALAR' or $ref_destination_stream eq 'ARRAY') { }
|
|
|
0 |
0 |
elsif ($ref_destination_stream->can('print')) { }
|
|
3395
|
6 |
635 |
if ($encode_destination_buffer)
|
|
3397
|
0 |
6 |
if (not eval {
|
|
3417
|
638 |
3 |
if ($ref_destination_stream eq 'SCALAR') { }
|
|
|
3 |
0 |
elsif (defined $destination_buffer) { }
|
|
3422
|
3 |
0 |
if ($ref_destination_stream eq 'ARRAY') { }
|
|
3431
|
0 |
0 |
if ($ref_destination_stream->can("close"))
|
|
3460
|
0 |
0 |
if (defined $s1 and defined $s2)
|
|
3466
|
0 |
0 |
if ($pos1 < 0)
|
|
3491
|
0 |
0 |
ref $string_i ? :
|
|
3492
|
0 |
0 |
ref $string_o ? :
|
|
3494
|
0 |
0 |
unless (defined $max_diff_count)
|
|
3498
|
0 |
0 |
if (defined $rbufi)
|
|
3502
|
0 |
0 |
if (defined $rbufo)
|
|
3512
|
0 |
0 |
unless $leni and $leno
|
|
3516
|
0 |
0 |
if (length $str > $lenmax)
|
|
3534
|
0 |
0 |
if ($linei eq $lineo)
|
|
3535
|
0 |
0 |
if (length $linei)
|
|
3550
|
0 |
0 |
if ($linei =~ /^(\s+)/)
|
|
3551
|
0 |
0 |
if ($lineo =~ /^(\s+)/)
|
|
3552
|
0 |
0 |
if ($leading_ws_i ne $leading_ws_o) { }
|
|
3554
|
0 |
0 |
if ($leading_ws_i =~ /\t/)
|
|
3561
|
0 |
0 |
if ($linei =~ /(\s+)$/)
|
|
3562
|
0 |
0 |
if ($lineo =~ /(\s+)$/)
|
|
3563
|
0 |
0 |
if ($trailing_ws_i ne $trailing_ws_o)
|
|
3570
|
0 |
0 |
if ($pos1 > 60)
|
|
3580
|
0 |
0 |
if ($last_nonblank_line)
|
|
3592
|
0 |
0 |
if $diff_count >= $max_diff_count
|
|
3595
|
0 |
0 |
if ($diff_count)
|
|
3600
|
0 |
0 |
if ($nlines_i > $nlines_o) { }
|
|
|
0 |
0 |
elsif ($nlines_i < $nlines_o) { }
|
|
3636
|
0 |
647 |
if ($Windows_type)
|
|
3641
|
639 |
8 |
if (defined $config_file)
|
|
3647
|
0 |
647 |
if ($rOpts->{'show-options'})
|
|
3761
|
200595 |
0 |
if ($short_name)
|
|
3762
|
0 |
200595 |
if ($expansion{$short_name})
|
|
3769
|
102555 |
98040 |
if ($flag eq "!")
|
|
3772
|
0 |
102555 |
if ($expansion{$nshort_name})
|
|
4175
|
50955 |
205110 |
unless (defined $option_category{$long_name})
|
|
4176
|
645 |
50310 |
if ($long_name =~ /^html-linked/) { }
|
|
|
645 |
49665 |
elsif ($long_name =~ /^pod2html/) { }
|
|
4364
|
43215 |
3225 |
if (defined $val)
|
|
4374
|
188340 |
67725 |
if substr($opt, -2, 2) ne "=s"
|
|
4680
|
7 |
640 |
if ($use_cache) { }
|
|
4682
|
2 |
5 |
if (my $result = $process_command_line_cache{$cache_key}) { }
|
|
4690
|
5 |
0 |
if $retvals[0]{'memoize'}
|
|
4718
|
645 |
0 |
if (eval {
|
|
4720
|
0 |
645 |
if (not $ok and 0)
|
|
4738
|
645 |
0 |
if ($dump_options_type ne "perltidyrc")
|
|
4741
|
0 |
645 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
4761
|
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)$/) { }
|
|
4770
|
0 |
0 |
if (defined $config_file)
|
|
4778
|
0 |
0 |
if (defined $config_file)
|
|
4779
|
0 |
0 |
if (my($start_dir, $search_file) = $config_file =~ m[^(.*)\.\.\./(.*)$])
|
|
4782
|
0 |
0 |
unless $start_dir
|
|
4786
|
0 |
0 |
if (defined $found_file)
|
|
4791
|
0 |
0 |
unless (-e $config_file)
|
|
4846
|
0 |
645 |
if ($saw_dump_profile and $saw_ignore_profile)
|
|
4854
|
639 |
6 |
unless ($saw_ignore_profile)
|
|
4859
|
639 |
0 |
if ($perltidyrc_stream)
|
|
4860
|
0 |
639 |
if (defined $config_file) { }
|
|
4876
|
0 |
639 |
unless (defined $config_file)
|
|
4884
|
639 |
0 |
if (defined $config_file)
|
|
4886
|
0 |
639 |
unless (defined $rconfig_string)
|
|
4896
|
0 |
639 |
if ($saw_dump_profile)
|
|
4902
|
639 |
0 |
if (defined $rconfig_string)
|
|
4906
|
0 |
639 |
if $death_message
|
|
4910
|
269 |
370 |
if (@{$rconfig_list;})
|
|
4919
|
0 |
269 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
4930
|
0 |
269 |
if (@ARGV)
|
|
4934
|
0 |
0 |
if (length $str < 70) { }
|
|
4935
|
0 |
0 |
if ($str)
|
|
4993
|
0 |
6187 |
if (defined $Opts{$cmd})
|
|
5022
|
0 |
645 |
unless (&GetOptions(\%Opts, @{$roption_string;}))
|
|
5028
|
0 |
4515 |
if ($Opts{$long_name})
|
|
5037
|
645 |
0 |
if (defined $glc)
|
|
5039
|
0 |
645 |
if (not $ok and 0)
|
|
5066
|
0 |
647 |
if ($exclude_string)
|
|
5072
|
0 |
0 |
unless ($is_excluded_word{'*'})
|
|
5084
|
0 |
647 |
if ($is_excluded_word{'*'})
|
|
5089
|
3 |
644 |
if ($input_string) { }
|
|
5101
|
4531 |
0 |
unless ($seen{$word} or $is_excluded_word{$word})
|
|
5141
|
3 |
0 |
if (defined $input_string and length $input_string)
|
|
5148
|
3 |
0 |
if ($rforced_words)
|
|
5154
|
11 |
0 |
unless ($seen{$word})
|
|
5210
|
0 |
4012 |
unless defined $test_string
|
|
5213
|
0 |
4012 |
if ($test_string =~ /[^[:print:]]/g)
|
|
5223
|
0 |
4012 |
if ($leading_dash_check{$opt_name} and substr($test_string, 0, 1) eq "-")
|
|
5227
|
0 |
0 |
if ($opt_name eq "outfile" or $opt_name eq "output_path")
|
|
5236
|
0 |
4012 |
if ($leading_space_check{$opt_name} and $test_string =~ /^\s/)
|
|
5241
|
0 |
4012 |
if ($trailing_space_check{$opt_name} and $test_string =~ /\s$/)
|
|
5246
|
0 |
647 |
if ($message)
|
|
5275
|
0 |
647 |
unless ($encoding =~ /^\s*(?:guess|none|utf8|utf-8)\s*$/i)
|
|
5289
|
0 |
647 |
if (not defined $integer_range_check or $integer_range_check <= 0 or $integer_range_check > 3)
|
|
5296
|
647 |
0 |
if ($integer_range_check)
|
|
5300
|
3233 |
43351 |
unless defined $val
|
|
5302
|
0 |
43351 |
unless defined $range
|
|
5305
|
0 |
43351 |
if (defined $min and $val < $min)
|
|
5307
|
0 |
0 |
if ($integer_range_check < 3)
|
|
5309
|
0 |
0 |
defined $default ? :
|
|
5314
|
0 |
43351 |
if (defined $max and $val > $max)
|
|
5316
|
0 |
0 |
if ($integer_range_check < 3)
|
|
5318
|
0 |
0 |
defined $default ? :
|
|
5324
|
0 |
647 |
if ($Error_message)
|
|
5325
|
0 |
0 |
if ($integer_range_check == 1) { }
|
|
|
0 |
0 |
elsif ($integer_range_check == 2) { }
|
|
5345
|
0 |
647 |
if (defined $rOpts->{'vertical-tightness'})
|
|
5352
|
0 |
647 |
if (defined $rOpts->{'vertical-tightness-closing'})
|
|
5359
|
0 |
647 |
if (defined $rOpts->{'closing-token-indentation'})
|
|
5370
|
0 |
1294 |
if ($rOpts->{$optname})
|
|
5382
|
1254 |
1334 |
if ($rOpts->{$key})
|
|
5383
|
0 |
1254 |
if ($rOpts->{$key} < 0)
|
|
5387
|
0 |
1254 |
if ($rOpts->{$key} > $MAX_BLANK_COUNT)
|
|
5404
|
1 |
646 |
if (defined $rOpts->{'logfile-gap'} and $rOpts->{'logfile-gap'} >= 0)
|
|
5411
|
3 |
0 |
unless ($rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'} or $rOpts->{'delete-old-newlines'})
|
|
5420
|
5 |
642 |
if ($rOpts->{'indent-spaced-block-comments'})
|
|
5425
|
3 |
644 |
if ($rOpts->{'opening-brace-always-on-right'})
|
|
5427
|
0 |
3 |
if ($rOpts->{'opening-brace-on-new-line'})
|
|
5434
|
0 |
3 |
if ($rOpts->{'brace-left-and-indent'})
|
|
5444
|
623 |
24 |
unless (defined $rOpts->{'opening-brace-on-new-line'})
|
|
5448
|
2 |
645 |
if ($rOpts->{'entab-leading-whitespace'})
|
|
5449
|
0 |
2 |
if ($rOpts->{'entab-leading-whitespace'} < 0)
|
|
5455
|
1 |
1 |
if ($rOpts->{'tabs'})
|
|
5469
|
647 |
0 |
if ($rOpts->{'default-tabsize'}) { }
|
|
5470
|
0 |
647 |
if ($rOpts->{'default-tabsize'} < 0)
|
|
5474
|
0 |
647 |
if ($rOpts->{'default-tabsize'} > $MAX_DEFAULT_TABSIZE)
|
|
5486
|
3 |
644 |
if (defined $rOpts->{'sub-alias-list'} and length $rOpts->{'sub-alias-list'})
|
|
5503
|
6 |
641 |
unless ($rOpts->{'fuzzy-line-length'})
|
|
5504
|
0 |
6 |
if ($rOpts->{'maximum-line-length'} != 1 or $rOpts->{'continuation-indentation'} != 0)
|
|
5512
|
0 |
647 |
if ($rOpts->{'short-concatenation-item-length'} > 12)
|
|
5523
|
4 |
643 |
if ($rOpts->{'freeze-whitespace'})
|
|
5533
|
1 |
646 |
if ($line_range_tidy)
|
|
5535
|
0 |
1 |
if ($num_files > 1)
|
|
5542
|
1 |
0 |
if ($line_range_tidy =~ /^(\d+):(\d+)?$/) { }
|
|
5545
|
0 |
1 |
if ($n1 < 1)
|
|
5550
|
0 |
1 |
if (defined $n2 and $n2 < $n1)
|
|
5579
|
0 |
0 |
if (-f $try_path) { }
|
|
|
0 |
0 |
elsif ($search_dir eq '/') { }
|
|
5617
|
5 |
2867 |
if ($word =~ /^(-[-]?no)-(.*)/)
|
|
5620
|
2872 |
0 |
if ($word =~ /^-[-]?([\w\-]+)(.*)/) { }
|
|
5626
|
694 |
2178 |
if ($pass_count == 0)
|
|
5632
|
533 |
2339 |
if ($$rexpansion{$abr . $flags})
|
|
5638
|
1093 |
1779 |
if ($rexpansion->{$abr}) { }
|
|
5644
|
0 |
1609 |
unless $abbrev
|
|
5663
|
914 |
379 |
unless $abbrev_count
|
|
5666
|
0 |
379 |
if ($pass_count == $max_passes)
|
|
5674
|
0 |
0 |
if ($num < 50) { }
|
|
5686
|
0 |
0 |
if (defined $config_file) { }
|
|
5750
|
1203 |
7 |
if (substr($arg, 0, 2) eq "--" and length $arg > 2)
|
|
5753
|
0 |
1203 |
if ($arg_seeking_string_last and $arg =~ /^\-\-[A-Za-z]/)
|
|
5760
|
0 |
1203 |
if (index($arg, "=") == -1 and $$ris_string_option{substr $arg, 2})
|
|
5770
|
0 |
914 |
if ($error_message)
|
|
5772
|
0 |
0 |
defined $config_file ? :
|
|
5817
|
0 |
0 |
unless $base =~ s/;-?\d*$//
|
|
5831
|
0 |
0 |
unless $base =~ /(?:^|[^^])\./
|
|
5834
|
0 |
0 |
$base =~ /\.$/ ? :
|
|
5852
|
0 |
0 |
unless $Perl::Tidy::OSNAME =~ /win32|dos/i
|
|
5865
|
0 |
0 |
if (not $ok and 0)
|
|
5876
|
0 |
0 |
unless $id
|
|
5894
|
0 |
0 |
unless (defined $os)
|
|
5908
|
0 |
0 |
$os eq '2000' && $major != 5 ? :
|
|
5919
|
0 |
647 |
if $is_Windows
|
|
5933
|
0 |
0 |
if ($is_Windows) { }
|
|
5943
|
0 |
0 |
unless defined $config_file
|
|
5953
|
0 |
0 |
if (defined $config_file)
|
|
5954
|
0 |
0 |
if (my($start_dir, $search_file) = $config_file =~ m[^(.*)\.\.\./(.*)$])
|
|
5959
|
0 |
0 |
unless $start_dir
|
|
5962
|
0 |
0 |
if (defined $found_file)
|
|
5975
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
5976
|
0 |
0 |
if ($is_Windows)
|
|
5978
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
5986
|
0 |
0 |
if $Perl::Tidy::OSNAME =~ /win32/i
|
|
5991
|
0 |
0 |
if (defined $ENV{$var}) { }
|
|
5995
|
0 |
0 |
if ($var eq "PERLTIDY")
|
|
5998
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6004
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6006
|
0 |
0 |
if ($is_Windows)
|
|
6010
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6020
|
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') { }
|
|
6022
|
0 |
0 |
if ($Windows_type)
|
|
6028
|
0 |
0 |
if ($allusers)
|
|
6031
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6034
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6041
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6044
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6060
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6063
|
0 |
0 |
if &$exists_config_file($config_file)
|
|
6079
|
0 |
0 |
unless ($os)
|
|
6081
|
0 |
0 |
unless $os
|
|
6086
|
0 |
0 |
if ($os =~ /9[58]|Me/) { }
|
|
|
0 |
0 |
elsif ($os =~ /NT|XP|200?/) { }
|
|
6090
|
0 |
0 |
$os =~ /XP/ ? :
|
|
6091
|
0 |
0 |
$os =~ /NT/ ? :
|
|
6114
|
0 |
0 |
if ($rconfig_string) { }
|
|
6147
|
638 |
1 |
unless (${$rconfig_string;} =~ /^\s*---\w/m)
|
|
6156
|
3 |
1 |
if ($line and $line =~ /^\s*---(\w[\w-]*)/)
|
|
6163
|
0 |
3 |
if (not $is_known and $word =~ s/^no-?//)
|
|
6167
|
1 |
2 |
if (not $is_known) { }
|
|
6179
|
1 |
0 |
if ($change_notices)
|
|
6209
|
0 |
639 |
if ($death_message)
|
|
6220
|
0 |
507 |
unless length $line
|
|
6228
|
0 |
507 |
if ($line =~ /^(?: (\w+) \s* \{ ) (.*)? $/x) { }
|
|
|
0 |
507 |
elsif ($line =~ /^{/) { }
|
|
|
0 |
507 |
elsif ($line =~ /^(.*)?\}$/) { }
|
|
6232
|
0 |
0 |
if $opening_brace_line
|
|
6234
|
0 |
0 |
unless $body and $body =~ s/\}$//
|
|
6237
|
0 |
0 |
if ($rexpansion->{$name})
|
|
6259
|
0 |
0 |
if ($opening_brace_line) { }
|
|
6273
|
507 |
0 |
if ($body)
|
|
6276
|
0 |
507 |
if ($msg)
|
|
6285
|
0 |
507 |
if ($name) { }
|
|
6297
|
0 |
639 |
if ($opening_brace_line)
|
|
6338
|
5 |
542 |
unless length $line
|
|
6340
|
542 |
0 |
if (not $quote_char) { }
|
|
6343
|
35 |
507 |
if (substr($line, 0, 1) eq "#")
|
|
6362
|
1132 |
178 |
if (not $quote_char) { }
|
|
6364
|
89 |
1043 |
if ($in_string =~ /\G([\"\'])/cg) { }
|
|
|
32 |
1011 |
elsif ($in_string =~ /\G#/cg) { }
|
|
|
536 |
475 |
elsif ($in_string =~ /\G([^\#\'\"]+)/cg) { }
|
|
6379
|
32 |
0 |
if (not length $out_string or $out_string =~ s/\s+$//)
|
|
6398
|
89 |
89 |
if ($in_string =~ /\G($quote_char)/cg) { }
|
|
|
89 |
0 |
elsif ($in_string =~ /\G([^$quote_char]+)/cg) { }
|
|
6417
|
507 |
0 |
unless ($quote_char)
|
|
6427
|
0 |
639 |
if ($quote_char)
|
|
6429
|
0 |
0 |
if (length $quote_start_line > $max_len)
|
|
6462
|
0 |
1154 |
unless (defined $body)
|
|
6467
|
697 |
6187 |
if ($quote_char) { }
|
|
6468
|
89 |
608 |
if ($body =~ /\G($quote_char)/cg) { }
|
|
|
608 |
0 |
elsif ($body =~ /\G(.)/cg) { }
|
|
6477
|
0 |
0 |
if (length $part)
|
|
6488
|
89 |
6098 |
if ($body =~ /\G([\"\'])/cg) { }
|
|
|
181 |
5917 |
elsif ($body =~ /\G(\s+)/cg) { }
|
|
|
4763 |
1154 |
elsif ($body =~ /\G(.)/cg) { }
|
|
6492
|
181 |
0 |
if (length $part)
|
|
6499
|
519 |
635 |
if (length $part)
|
|
6543
|
0 |
0 |
unless defined $_
|
|
6573
|
247680 |
9179 |
if ($opt =~ /(.*)(!|=.*)$/)
|
|
6577
|
90953 |
165906 |
if (defined $rOpts->{$opt})
|
|
6586
|
90655 |
303 |
if ($flag)
|
|
6587
|
47211 |
43444 |
if ($flag =~ /^=/) { }
|
|
|
43444 |
0 |
elsif ($flag =~ /^!/) { }
|
|
6588
|
3339 |
43872 |
unless ($value =~ /^\d+$/)
|
|
6592
|
10456 |
32988 |
unless $value
|