"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Perl/Tidy.pm" between
Perl-Tidy-20210402.tar.gz and Perl-Tidy-20210717.tar.gz

About: Perltidy is a Perl script indenter and reformatter (beautifier).

Tidy.pm  (Perl-Tidy-20210402):Tidy.pm  (Perl-Tidy-20210717)
skipping to change at line 113 skipping to change at line 113
# Release version is the approximate YYMMDD of the release. # Release version is the approximate YYMMDD of the release.
# Development version is (Last Release).(Development Number) # Development version is (Last Release).(Development Number)
# To make the number continually increasing, the Development Number is a 2 # To make the number continually increasing, the Development Number is a 2
# digit number starting at 01 after a release is continually bumped along # digit number starting at 01 after a release is continually bumped along
# at significant points during development. If it ever reaches 99 then the # at significant points during development. If it ever reaches 99 then the
# Release version must be bumped, and it is probably past time for a # Release version must be bumped, and it is probably past time for a
# release anyway. # release anyway.
$VERSION = '20210402'; $VERSION = '20210717';
} }
sub DESTROY { sub DESTROY {
# required to avoid call to AUTOLOAD in some versions of perl # required to avoid call to AUTOLOAD in some versions of perl
} }
sub AUTOLOAD { sub AUTOLOAD {
# Catch any undefined sub calls so that we are sure to get # Catch any undefined sub calls so that we are sure to get
skipping to change at line 838 skipping to change at line 838
# The module is not actually loaded unless/until it is needed # The module is not actually loaded unless/until it is needed
my $loaded_unicode_gcstring; my $loaded_unicode_gcstring;
if ( !$rOpts->{'use-unicode-gcstring'} ) { if ( !$rOpts->{'use-unicode-gcstring'} ) {
$loaded_unicode_gcstring = 0; $loaded_unicode_gcstring = 0;
} }
#--------------------------------------------------------------- #---------------------------------------------------------------
# Ready to go... # Ready to go...
# main loop to process all files in argument list # main loop to process all files in argument list
#--------------------------------------------------------------- #---------------------------------------------------------------
my $number_of_files = @ARGV; my $formatter = undef;
my $formatter = undef; my $tokenizer = undef;
my $tokenizer = undef;
# Remove duplicate filenames. Otherwise, for example if the user entered
# perltidy -b myfile.pl myfile.pl
# the backup version of the original would be lost.
if ( @ARGV > 1 ) {
my %seen = ();
@ARGV = grep { !$seen{$_}++ } @ARGV;
}
# If requested, process in order of increasing file size # If requested, process in order of increasing file size
# This can significantly reduce perl's virtual memory usage during testing. # This can significantly reduce perl's virtual memory usage during testing.
if ( $number_of_files > 1 && $rOpts->{'file-size-order'} ) { if ( @ARGV > 1 && $rOpts->{'file-size-order'} ) {
@ARGV = @ARGV =
map { $_->[0] } map { $_->[0] }
sort { $a->[1] <=> $b->[1] } sort { $a->[1] <=> $b->[1] }
map { [ $_, -e $_ ? -s $_ : 0 ] } @ARGV; map { [ $_, -e $_ ? -s $_ : 0 ] } @ARGV;
} }
# Remove duplicate filenames. Otherwise, for example if the user entered my $number_of_files = @ARGV;
# perltidy -b myfile.pl myfile.pl
# the backup version of the original would be lost.
if ( $number_of_files > 1 ) {
my %seen = ();
@ARGV = grep { !$seen{$_}++ } @ARGV;
}
while ( my $input_file = shift @ARGV ) { while ( my $input_file = shift @ARGV ) {
my $fileroot; my $fileroot;
my @input_file_stat; my @input_file_stat;
my $display_name; my $display_name;
#--------------------------------------------------------------- #---------------------------------------------------------------
# prepare this input stream # prepare this input stream
#--------------------------------------------------------------- #---------------------------------------------------------------
if ($source_stream) { if ($source_stream) {
$fileroot = "perltidy"; $fileroot = "perltidy";
skipping to change at line 904 skipping to change at line 904
unless ( -e $input_file ) { unless ( -e $input_file ) {
# file doesn't exist - check for a file glob # file doesn't exist - check for a file glob
if ( $input_file =~ /([\?\*\[\{])/ ) { if ( $input_file =~ /([\?\*\[\{])/ ) {
# Windows shell may not remove quotes, so do it # Windows shell may not remove quotes, so do it
my $input_file = $input_file; my $input_file = $input_file;
if ( $input_file =~ /^\'(.+)\'$/ ) { $input_file = $1 } if ( $input_file =~ /^\'(.+)\'$/ ) { $input_file = $1 }
if ( $input_file =~ /^\"(.+)\"$/ ) { $input_file = $1 } if ( $input_file =~ /^\"(.+)\"$/ ) { $input_file = $1 }
my $pattern = fileglob_to_re($input_file); my $pattern = fileglob_to_re($input_file);
if ( opendir( DIR, './' ) ) { my $dh;
if ( opendir( $dh, './' ) ) {
my @files = my @files =
grep { /$pattern/ && !-d $_ } readdir(DIR); grep { /$pattern/ && !-d $_ } readdir($dh);
closedir(DIR); closedir($dh);
if (@files) { if (@files) {
unshift @ARGV, @files; unshift @ARGV, @files;
next; next;
} }
} }
} }
Warn("skipping file: '$input_file': no matches found\n"); Warn("skipping file: '$input_file': no matches found\n");
next; next;
} }
skipping to change at line 1014 skipping to change at line 1015
my $do_convergence_test = $max_iterations > 1; my $do_convergence_test = $max_iterations > 1;
my $convergence_log_message; my $convergence_log_message;
my %saw_md5; my %saw_md5;
my $digest_input = 0; my $digest_input = 0;
my $buf = ''; my $buf = '';
while ( my $line = $source_object->get_line() ) { while ( my $line = $source_object->get_line() ) {
$buf .= $line; $buf .= $line;
} }
my $remove_terminal_newline =
!$rOpts->{'add-terminal-newline'} && substr( $buf, -1, 1 ) !~ /\n/;
# Decode the input stream if necessary requested # Decode the input stream if necessary requested
my $encoding_in = ""; my $encoding_in = "";
my $rOpts_character_encoding = $rOpts->{'character-encoding'}; my $rOpts_character_encoding = $rOpts->{'character-encoding'};
my $encoding_log_message; my $encoding_log_message;
# Case 1. See if we already have an encoded string. In that # Case 1. See if we already have an encoded string. In that
# case, we have to ignore any encoding flag. # case, we have to ignore any encoding flag.
if ( utf8::is_utf8($buf) ) { if ( utf8::is_utf8($buf) ) {
$encoding_in = "utf8"; $encoding_in = "utf8";
} }
skipping to change at line 1277 skipping to change at line 1281
if ( $rOpts->{'preserve-line-endings'} ) { if ( $rOpts->{'preserve-line-endings'} ) {
$line_separator = find_input_line_ending($input_file); $line_separator = find_input_line_ending($input_file);
} }
$line_separator = "\n" unless defined($line_separator); $line_separator = "\n" unless defined($line_separator);
# the 'sink_object' knows how to write the output file # the 'sink_object' knows how to write the output file
my ( $sink_object, $postfilter_buffer ); my ( $sink_object, $postfilter_buffer );
my $use_buffer = my $use_buffer =
$postfilter $postfilter
|| $remove_terminal_newline
|| $rOpts->{'assert-tidy'} || $rOpts->{'assert-tidy'}
|| $rOpts->{'assert-untidy'}; || $rOpts->{'assert-untidy'};
$sink_object = Perl::Tidy::LineSink->new( $sink_object = Perl::Tidy::LineSink->new(
output_file => $use_buffer ? \$postfilter_buffer : $output_file, output_file => $use_buffer ? \$postfilter_buffer : $output_file,
line_separator => $line_separator, line_separator => $line_separator,
rOpts => $rOpts, rOpts => $rOpts,
rpending_logfile_message => $rpending_logfile_message, rpending_logfile_message => $rpending_logfile_message,
is_encoded_data => $is_encoded_data, is_encoded_data => $is_encoded_data,
); );
skipping to change at line 1616 skipping to change at line 1621
); );
## $Warn_count ||= 1; # logger warning does this now ## $Warn_count ||= 1; # logger warning does this now
} }
} }
$source_object = Perl::Tidy::LineSource->new( $source_object = Perl::Tidy::LineSource->new(
input_file => \$buf, input_file => \$buf,
rOpts => $rOpts, rOpts => $rOpts,
rpending_logfile_message => $rpending_logfile_message, rpending_logfile_message => $rpending_logfile_message,
); );
while ( my $line = $source_object->get_line() ) {
$sink_object->write_line($line); # Copy the filtered buffer to the final destination
if ( !$remove_terminal_newline ) {
while ( my $line = $source_object->get_line() ) {
$sink_object->write_line($line);
}
}
else {
# Copy the filtered buffer but remove the newline char from the
# final line
my $line;
while ( my $next_line = $source_object->get_line() ) {
$sink_object->write_line($line) if ($line);
$line = $next_line;
}
if ($line) {
$sink_object->set_line_separator(undef);
chomp $line;
$sink_object->write_line($line);
}
} }
$source_object->close_input_file(); $source_object->close_input_file();
} }
# Save names of the input and output files for syntax check # Save names of the input and output files for syntax check
my $ifname = $input_file; my $ifname = $input_file;
my $ofname = $output_file; my $ofname = $output_file;
#--------------------------------------------------------------- #---------------------------------------------------------------
# handle the -b option (backup and modify in-place) # handle the -b option (backup and modify in-place)
#--------------------------------------------------------------- #---------------------------------------------------------------
skipping to change at line 1762 skipping to change at line 1787
); );
} }
} }
# else use default permissions for html and any other format # else use default permissions for html and any other format
} }
} }
#--------------------------------------------------------------- #---------------------------------------------------------------
# Do syntax check if requested and possible # Do syntax check if requested and possible
# This is permanently deactivated but the code remains for reference
#--------------------------------------------------------------- #---------------------------------------------------------------
my $infile_syntax_ok = 0; # -1 no 0=don't know 1 yes my $infile_syntax_ok = 0; # -1 no 0=don't know 1 yes
if ( $logger_object if ( 0
&& $logger_object
&& $rOpts->{'check-syntax'} && $rOpts->{'check-syntax'}
&& $ifname && $ifname
&& $ofname ) && $ofname )
{ {
$infile_syntax_ok = $infile_syntax_ok =
check_syntax( $ifname, $ofname, $logger_object, $rOpts ); check_syntax( $ifname, $ofname, $logger_object, $rOpts );
} }
#--------------------------------------------------------------- #---------------------------------------------------------------
# remove the original file for in-place modify as follows: # remove the original file for in-place modify as follows:
skipping to change at line 2222 skipping to change at line 2249
$add_option->( 'logfile-gap', 'g', ':i' ); $add_option->( 'logfile-gap', 'g', ':i' );
$add_option->( 'outfile', 'o', '=s' ); $add_option->( 'outfile', 'o', '=s' );
$add_option->( 'output-file-extension', 'oext', '=s' ); $add_option->( 'output-file-extension', 'oext', '=s' );
$add_option->( 'output-path', 'opath', '=s' ); $add_option->( 'output-path', 'opath', '=s' );
$add_option->( 'profile', 'pro', '=s' ); $add_option->( 'profile', 'pro', '=s' );
$add_option->( 'quiet', 'q', '!' ); $add_option->( 'quiet', 'q', '!' );
$add_option->( 'standard-error-output', 'se', '!' ); $add_option->( 'standard-error-output', 'se', '!' );
$add_option->( 'standard-output', 'st', '!' ); $add_option->( 'standard-output', 'st', '!' );
$add_option->( 'use-unicode-gcstring', 'gcs', '!' ); $add_option->( 'use-unicode-gcstring', 'gcs', '!' );
$add_option->( 'warning-output', 'w', '!' ); $add_option->( 'warning-output', 'w', '!' );
$add_option->( 'add-terminal-newline', 'atnl', '!' );
# options which are both toggle switches and values moved here # options which are both toggle switches and values moved here
# to hide from tidyview (which does not show category 0 flags): # to hide from tidyview (which does not show category 0 flags):
# -ole moved here from category 1 # -ole moved here from category 1
# -sil moved here from category 2 # -sil moved here from category 2
$add_option->( 'output-line-ending', 'ole', '=s' ); $add_option->( 'output-line-ending', 'ole', '=s' );
$add_option->( 'starting-indentation-level', 'sil', '=i' ); $add_option->( 'starting-indentation-level', 'sil', '=i' );
######################################## ########################################
$category = 1; # Basic formatting options $category = 1; # Basic formatting options
skipping to change at line 2310 skipping to change at line 2338
$category = 4; # Comment controls $category = 4; # Comment controls
######################################## ########################################
$add_option->( 'closing-side-comment-else-flag', 'csce', '=i' ); $add_option->( 'closing-side-comment-else-flag', 'csce', '=i' );
$add_option->( 'closing-side-comment-interval', 'csci', '=i' ); $add_option->( 'closing-side-comment-interval', 'csci', '=i' );
$add_option->( 'closing-side-comment-list', 'cscl', '=s' ); $add_option->( 'closing-side-comment-list', 'cscl', '=s' );
$add_option->( 'closing-side-comment-maximum-text', 'csct', '=i' ); $add_option->( 'closing-side-comment-maximum-text', 'csct', '=i' );
$add_option->( 'closing-side-comment-prefix', 'cscp', '=s' ); $add_option->( 'closing-side-comment-prefix', 'cscp', '=s' );
$add_option->( 'closing-side-comment-warnings', 'cscw', '!' ); $add_option->( 'closing-side-comment-warnings', 'cscw', '!' );
$add_option->( 'closing-side-comments', 'csc', '!' ); $add_option->( 'closing-side-comments', 'csc', '!' );
$add_option->( 'closing-side-comments-balanced', 'cscb', '!' ); $add_option->( 'closing-side-comments-balanced', 'cscb', '!' );
$add_option->( 'code-skipping', 'cs', '!' );
$add_option->( 'code-skipping-begin', 'csb', '=s' );
$add_option->( 'code-skipping-end', 'cse', '=s' );
$add_option->( 'format-skipping', 'fs', '!' ); $add_option->( 'format-skipping', 'fs', '!' );
$add_option->( 'format-skipping-begin', 'fsb', '=s' ); $add_option->( 'format-skipping-begin', 'fsb', '=s' );
$add_option->( 'format-skipping-end', 'fse', '=s' ); $add_option->( 'format-skipping-end', 'fse', '=s' );
$add_option->( 'hanging-side-comments', 'hsc', '!' ); $add_option->( 'hanging-side-comments', 'hsc', '!' );
$add_option->( 'indent-block-comments', 'ibc', '!' ); $add_option->( 'indent-block-comments', 'ibc', '!' );
$add_option->( 'indent-spaced-block-comments', 'isbc', '!' ); $add_option->( 'indent-spaced-block-comments', 'isbc', '!' );
$add_option->( 'fixed-position-side-comment', 'fpsc', '=i' ); $add_option->( 'fixed-position-side-comment', 'fpsc', '=i' );
$add_option->( 'minimum-space-to-comment', 'msc', '=i' ); $add_option->( 'minimum-space-to-comment', 'msc', '=i' );
$add_option->( 'non-indenting-braces', 'nib', '!' ); $add_option->( 'non-indenting-braces', 'nib', '!' );
$add_option->( 'non-indenting-brace-prefix', 'nibp', '=s' ); $add_option->( 'non-indenting-brace-prefix', 'nibp', '=s' );
skipping to change at line 2543 skipping to change at line 2574
# Note: we could actually allow negative ci if someone really wants it: # Note: we could actually allow negative ci if someone really wants it:
# $option_range{'continuation-indentation'} = [ undef, undef ]; # $option_range{'continuation-indentation'} = [ undef, undef ];
#--------------------------------------------------------------- #---------------------------------------------------------------
# Assign default values to the above options here, except # Assign default values to the above options here, except
# for 'outfile' and 'help'. # for 'outfile' and 'help'.
# These settings should approximate the perlstyle(1) suggestions. # These settings should approximate the perlstyle(1) suggestions.
#--------------------------------------------------------------- #---------------------------------------------------------------
my @defaults = qw( my @defaults = qw(
add-newlines add-newlines
add-terminal-newline
add-semicolons add-semicolons
add-whitespace add-whitespace
blanks-before-blocks blanks-before-blocks
blanks-before-comments blanks-before-comments
blank-lines-before-subs=1 blank-lines-before-subs=1
blank-lines-before-packages=1 blank-lines-before-packages=1
keyword-group-blanks-size=5 keyword-group-blanks-size=5
keyword-group-blanks-repeat-count=0 keyword-group-blanks-repeat-count=0
keyword-group-blanks-before=1 keyword-group-blanks-before=1
skipping to change at line 2644 skipping to change at line 2676
space-backslash-quote=1 space-backslash-quote=1
space-prototype-paren=1 space-prototype-paren=1
square-bracket-tightness=1 square-bracket-tightness=1
square-bracket-vertical-tightness-closing=0 square-bracket-vertical-tightness-closing=0
square-bracket-vertical-tightness=0 square-bracket-vertical-tightness=0
static-block-comments static-block-comments
timestamp timestamp
trim-qw trim-qw
format=tidy format=tidy
backup-file-extension=bak backup-file-extension=bak
code-skipping
format-skipping format-skipping
default-tabsize=8 default-tabsize=8
pod2html pod2html
html-table-of-contents html-table-of-contents
html-entities html-entities
); );
push @defaults, "perl-syntax-check-flags=-c -T"; push @defaults, "perl-syntax-check-flags=-c -T";
skipping to change at line 2787 skipping to change at line 2820
'stack-opening-block-brace' => [qw(bbvt=2 bbvtl=*)], 'stack-opening-block-brace' => [qw(bbvt=2 bbvtl=*)],
'sobb' => [qw(bbvt=2 bbvtl=*)], 'sobb' => [qw(bbvt=2 bbvtl=*)],
'nostack-opening-block-brace' => [qw(bbvt=0)], 'nostack-opening-block-brace' => [qw(bbvt=0)],
'nsobb' => [qw(bbvt=0)], 'nsobb' => [qw(bbvt=0)],
'converge' => [qw(it=4)], 'converge' => [qw(it=4)],
'noconverge' => [qw(it=1)], 'noconverge' => [qw(it=1)],
'conv' => [qw(it=4)], 'conv' => [qw(it=4)],
'nconv' => [qw(it=1)], 'nconv' => [qw(it=1)],
# FIXME: possible future shortcut. This will remain deactivated until # NOTE: This is a possible future shortcut. But it will remain
# the -lpxl flag is no longer experimental. # deactivated until the -lpxl flag is no longer experimental.
# 'line-up-function-parentheses' => [ qw(lp), q#lpxl=[ { F(2# ], # 'line-up-function-parentheses' => [ qw(lp), q#lpxl=[ { F(2# ],
# 'lfp' => [qw(line-up-function-parentheses)], # 'lfp' => [qw(line-up-function-parentheses)],
# 'mangle' originally deleted pod and comments, but to keep it # 'mangle' originally deleted pod and comments, but to keep it
# reversible, it no longer does. But if you really want to # reversible, it no longer does. But if you really want to
# delete them, just use: # delete them, just use:
# -mangle -dac # -mangle -dac
# An interesting use for 'mangle' is to do this: # An interesting use for 'mangle' is to do this:
# perltidy -mangle myfile.pl -st | perltidy -o myfile.pl.new # perltidy -mangle myfile.pl -st | perltidy -o myfile.pl.new
# which will form as many one-line blocks as possible # which will form as many one-line blocks as possible
'mangle' => [ 'mangle' => [
qw( qw(
check-syntax
keep-old-blank-lines=0 keep-old-blank-lines=0
delete-old-newlines delete-old-newlines
delete-old-whitespace delete-old-whitespace
delete-semicolons delete-semicolons
indent-columns=0 indent-columns=0
maximum-consecutive-blank-lines=0 maximum-consecutive-blank-lines=0
maximum-line-length=100000 maximum-line-length=100000
noadd-newlines noadd-newlines
noadd-semicolons noadd-semicolons
noadd-whitespace noadd-whitespace
skipping to change at line 2829 skipping to change at line 2861
], ],
# 'extrude' originally deleted pod and comments, but to keep it # 'extrude' originally deleted pod and comments, but to keep it
# reversible, it no longer does. But if you really want to # reversible, it no longer does. But if you really want to
# delete them, just use # delete them, just use
# extrude -dac # extrude -dac
# #
# An interesting use for 'extrude' is to do this: # An interesting use for 'extrude' is to do this:
# perltidy -extrude myfile.pl -st | perltidy -o myfile.pl.new # perltidy -extrude myfile.pl -st | perltidy -o myfile.pl.new
# which will break up all one-line blocks. # which will break up all one-line blocks.
#
# Removed 'check-syntax' option, which is unsafe because it may execute
# code in BEGIN blocks. Example 'Moose/debugger-duck_type.t'.
'extrude' => [ 'extrude' => [
qw( qw(
ci=0 ci=0
delete-old-newlines delete-old-newlines
delete-old-whitespace delete-old-whitespace
delete-semicolons delete-semicolons
indent-columns=0 indent-columns=0
maximum-consecutive-blank-lines=0 maximum-consecutive-blank-lines=0
maximum-line-length=1 maximum-line-length=1
noadd-semicolons noadd-semicolons
skipping to change at line 3216 skipping to change at line 3244
$rOpts->{'brace-vertical-tightness-closing'} = $vtc; $rOpts->{'brace-vertical-tightness-closing'} = $vtc;
} }
if ( defined $rOpts->{'closing-token-indentation'} ) { if ( defined $rOpts->{'closing-token-indentation'} ) {
my $cti = $rOpts->{'closing-token-indentation'}; my $cti = $rOpts->{'closing-token-indentation'};
$rOpts->{'closing-square-bracket-indentation'} = $cti; $rOpts->{'closing-square-bracket-indentation'} = $cti;
$rOpts->{'closing-brace-indentation'} = $cti; $rOpts->{'closing-brace-indentation'} = $cti;
$rOpts->{'closing-paren-indentation'} = $cti; $rOpts->{'closing-paren-indentation'} = $cti;
} }
# In quiet mode, there is no log file and hence no way to report # Syntax checking is no longer supported due to concerns about executing
# results of syntax check, so don't do it. # code in BEGIN blocks. The flag is still accepted for backwards
if ( $rOpts->{'quiet'} ) { # compatibility but is ignored if set.
$rOpts->{'check-syntax'} = 0; $rOpts->{'check-syntax'} = 0;
}
# can't check syntax if no output
if ( $rOpts->{'format'} ne 'tidy' ) {
$rOpts->{'check-syntax'} = 0;
}
# Never let Windows 9x/Me systems run syntax check -- this will prevent a
# wide variety of nasty problems on these systems, because they cannot
# reliably run backticks. Don't even think about changing this!
if ( $rOpts->{'check-syntax'}
&& $is_Windows
&& ( !$Windows_type || $Windows_type =~ /^(9|Me)/ ) )
{
$rOpts->{'check-syntax'} = 0;
}
###########################################################################
# Added Dec 2017: Deactivating check-syntax for all systems for safety
# because unexpected results can occur when code in BEGIN blocks is
# executed. This flag was included to help check for perltidy mistakes,
# and may still be useful for debugging. To activate for testing comment
# out the next three lines. Also fix sub 'do_check_syntax' in this file.
###########################################################################
else {
$rOpts->{'check-syntax'} = 0;
}
# It's really a bad idea to check syntax as root unless you wrote
# the script yourself. FIXME: not sure if this works with VMS
unless ($is_Windows) {
if ( $< == 0 && $rOpts->{'check-syntax'} ) {
$rOpts->{'check-syntax'} = 0;
${$rpending_complaint} .=
"Syntax check deactivated for safety; you shouldn't run this as root\n";
}
}
# check iteration count and quietly fix if necessary: # check iteration count and quietly fix if necessary:
# - iterations option only applies to code beautification mode # - iterations option only applies to code beautification mode
# - the convergence check should stop most runs on iteration 2, and # - the convergence check should stop most runs on iteration 2, and
# virtually all on iteration 3. But we'll allow up to 6. # virtually all on iteration 3. But we'll allow up to 6.
if ( $rOpts->{'format'} ne 'tidy' ) { if ( $rOpts->{'format'} ne 'tidy' ) {
$rOpts->{'iterations'} = 1; $rOpts->{'iterations'} = 1;
} }
elsif ( defined( $rOpts->{'iterations'} ) ) { elsif ( defined( $rOpts->{'iterations'} ) ) {
if ( $rOpts->{'iterations'} <= 0 ) { $rOpts->{'iterations'} = 1 } if ( $rOpts->{'iterations'} <= 0 ) { $rOpts->{'iterations'} = 1 }
skipping to change at line 3709 skipping to change at line 3699
my $Windows_type; my $Windows_type;
$Windows_type = Win_OS_Type($rpending_complaint) if $is_Windows; $Windows_type = Win_OS_Type($rpending_complaint) if $is_Windows;
return ( $is_Windows, $Windows_type ); return ( $is_Windows, $Windows_type );
} }
sub find_config_file { sub find_config_file {
# look for a .perltidyrc configuration file # look for a .perltidyrc configuration file
# For Windows also look for a file named perltidy.ini # For Windows also look for a file named perltidy.ini
my ( $is_Windows, $Windows_type, $rconfig_file_chatter, my ( $is_Windows, $Windows_type, $rconfig_file_chatter,
$rpending_complaint ) = @_; $rpending_complaint )
= @_;
${$rconfig_file_chatter} .= "# Config file search...system reported as:"; ${$rconfig_file_chatter} .= "# Config file search...system reported as:";
if ($is_Windows) { if ($is_Windows) {
${$rconfig_file_chatter} .= "Windows $Windows_type\n"; ${$rconfig_file_chatter} .= "Windows $Windows_type\n";
} }
else { else {
${$rconfig_file_chatter} .= " $^O\n"; ${$rconfig_file_chatter} .= " $^O\n";
} }
# sub to check file existence and record all tests # sub to check file existence and record all tests
 End of changes. 21 change blocks. 
69 lines changed or deleted 60 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)