"Fossies" - the Fresh Open Source Software Archive  

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

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

Tidy.pm  (Perl-Tidy-20191203):Tidy.pm  (Perl-Tidy-20200110)
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 = '20191203'; $VERSION = '20200110';
} }
sub streamhandle { sub streamhandle {
# given filename and mode (r or w), create an object which: # given filename and mode (r or w), create an object which:
# has a 'getline' method if mode='r', and # has a 'getline' method if mode='r', and
# has a 'print' method if mode='w'. # has a 'print' method if mode='w'.
# The objects also need a 'close' method. # The objects also need a 'close' method.
# #
# How the object is made: # How the object is made:
skipping to change at line 1180 skipping to change at line 1180
# line source for next iteration (if any) comes from the current # line source for next iteration (if any) comes from the current
# temporary output buffer # temporary output buffer
if ( $iter < $max_iterations ) { if ( $iter < $max_iterations ) {
$sink_object->close_output_file(); $sink_object->close_output_file();
$source_object = $source_object =
Perl::Tidy::LineSource->new( \$sink_buffer, $rOpts, Perl::Tidy::LineSource->new( \$sink_buffer, $rOpts,
$rpending_logfile_message ); $rpending_logfile_message );
# stop iterations if errors or converged # stop iterations if errors or converged
#my $stop_now = $logger_object->{_warning_count};
my $stop_now = $tokenizer->report_tokenization_errors(); my $stop_now = $tokenizer->report_tokenization_errors();
$stop_now ||= $tokenizer->get_unexpected_error_count();
if ($stop_now) { if ($stop_now) {
$convergence_log_message = <<EOM; $convergence_log_message = <<EOM;
Stopping iterations because of severe errors. Stopping iterations because of severe errors.
EOM EOM
} }
elsif ($do_convergence_test) { elsif ($do_convergence_test) {
my $digest = $md5_hex->($sink_buffer); my $digest = $md5_hex->($sink_buffer);
if ( !$saw_md5{$digest} ) { if ( !$saw_md5{$digest} ) {
$saw_md5{$digest} = $iter; $saw_md5{$digest} = $iter;
skipping to change at line 1884 skipping to change at line 1884
$add_option->( 'stack-opening-paren', 'sop', '!' ); $add_option->( 'stack-opening-paren', 'sop', '!' );
$add_option->( 'stack-opening-square-bracket', 'sosb', '!' ); $add_option->( 'stack-opening-square-bracket', 'sosb', '!' );
$add_option->( 'vertical-tightness', 'vt', '=i' ); $add_option->( 'vertical-tightness', 'vt', '=i' );
$add_option->( 'vertical-tightness-closing', 'vtc', '=i' ); $add_option->( 'vertical-tightness-closing', 'vtc', '=i' );
$add_option->( 'want-break-after', 'wba', '=s' ); $add_option->( 'want-break-after', 'wba', '=s' );
$add_option->( 'want-break-before', 'wbb', '=s' ); $add_option->( 'want-break-before', 'wbb', '=s' );
$add_option->( 'break-after-all-operators', 'baao', '!' ); $add_option->( 'break-after-all-operators', 'baao', '!' );
$add_option->( 'break-before-all-operators', 'bbao', '!' ); $add_option->( 'break-before-all-operators', 'bbao', '!' );
$add_option->( 'keep-interior-semicolons', 'kis', '!' ); $add_option->( 'keep-interior-semicolons', 'kis', '!' );
$add_option->( 'one-line-block-semicolons', 'olbs', '=i' ); $add_option->( 'one-line-block-semicolons', 'olbs', '=i' );
$add_option->( 'one-line-block-nesting', 'olbn', '=i' );
######################################## ########################################
$category = 6; # Controlling list formatting $category = 6; # Controlling list formatting
######################################## ########################################
$add_option->( 'break-at-old-comma-breakpoints', 'boc', '!' ); $add_option->( 'break-at-old-comma-breakpoints', 'boc', '!' );
$add_option->( 'comma-arrow-breakpoints', 'cab', '=i' ); $add_option->( 'comma-arrow-breakpoints', 'cab', '=i' );
$add_option->( 'maximum-fields-per-table', 'mft', '=i' ); $add_option->( 'maximum-fields-per-table', 'mft', '=i' );
######################################## ########################################
$category = 7; # Retaining or ignoring existing line breaks $category = 7; # Retaining or ignoring existing line breaks
skipping to change at line 2111 skipping to change at line 2112
nodelete-old-whitespace nodelete-old-whitespace
nohtml nohtml
nologfile nologfile
noquiet noquiet
noshow-options noshow-options
nostatic-side-comments nostatic-side-comments
notabs notabs
nowarning-output nowarning-output
character-encoding=none character-encoding=none
one-line-block-semicolons=1 one-line-block-semicolons=1
one-line-block-nesting=0
outdent-labels outdent-labels
outdent-long-quotes outdent-long-quotes
outdent-long-comments outdent-long-comments
paren-tightness=1 paren-tightness=1
paren-vertical-tightness-closing=0 paren-vertical-tightness-closing=0
paren-vertical-tightness=0 paren-vertical-tightness=0
pass-version-line pass-version-line
noweld-nested-containers noweld-nested-containers
recombine recombine
valign valign
skipping to change at line 4001 skipping to change at line 4003
return $infile_syntax_ok; return $infile_syntax_ok;
} }
sub do_syntax_check { sub do_syntax_check {
# This should not be called; the syntax check is deactivated # This should not be called; the syntax check is deactivated
Die("Unexpected call for syntax check-shouldn't happen\n"); Die("Unexpected call for syntax check-shouldn't happen\n");
return; return;
} }
=pod
sub do_syntax_check {
my ( $stream, $flags, $error_redirection ) = @_;
############################################################
# This code is not reachable because syntax check is deactivated,
# but it is retained for reference.
############################################################
# We need a named input file for executing perl
my ( $stream_filename, $is_tmpfile ) = get_stream_as_named_file($stream);
# TODO: Need to add name of file to log somewhere
# otherwise Perl output is hard to read
if ( !$stream_filename ) { return $stream_filename, "" }
# We have to quote the filename in case it has unusual characters
# or spaces. Example: this filename #CM11.pm# gives trouble.
my $quoted_stream_filename = '"' . $stream_filename . '"';
# Under VMS something like -T will become -t (and an error) so we
# will put quotes around the flags. Double quotes seem to work on
# Unix/Windows/VMS, but this may not work on all systems. (Single
# quotes do not work under Windows). It could become necessary to
# put double quotes around each flag, such as: -"c" -"T"
# We may eventually need some system-dependent coding here.
$flags = '"' . $flags . '"';
# now wish for luck...
my $msg = qx/perl $flags $quoted_stream_filename $error_redirection/;
if ($is_tmpfile) {
unlink $stream_filename
or Perl::Tidy::Die("couldn't unlink stream $stream_filename: $!\n");
}
return $stream_filename, $msg;
}
=cut
1; 1;
 End of changes. 6 change blocks. 
41 lines changed or deleted 4 lines changed or added

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