"Fossies" - the Fresh Open Source Software Archive  

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

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

Logger.pm  (Perl-Tidy-20191203):Logger.pm  (Perl-Tidy-20200110)
##################################################################### #####################################################################
# #
# The Perl::Tidy::Logger class writes the .LOG and .ERR files # The Perl::Tidy::Logger class writes the .LOG and .ERR files
# #
##################################################################### #####################################################################
package Perl::Tidy::Logger; package Perl::Tidy::Logger;
use strict; use strict;
use warnings; use warnings;
our $VERSION = '20191203'; our $VERSION = '20200110';
sub new { sub new {
my ( $class, $rOpts, $log_file, $warning_file, $fh_stderr, $saw_extrude, my ( $class, $rOpts, $log_file, $warning_file, $fh_stderr, $saw_extrude,
$display_name ) $display_name )
= @_; = @_;
my $fh_warnings = $rOpts->{'standard-error-output'} ? $fh_stderr : undef; my $fh_warnings = $rOpts->{'standard-error-output'} ? $fh_stderr : undef;
# remove any old error output file if we might write a new one # remove any old error output file if we might write a new one
skipping to change at line 35 skipping to change at line 35
"couldn't unlink warning file $warning_file: $!\n"); "couldn't unlink warning file $warning_file: $!\n");
} }
} }
my $logfile_gap = my $logfile_gap =
defined( $rOpts->{'logfile-gap'} ) defined( $rOpts->{'logfile-gap'} )
? $rOpts->{'logfile-gap'} ? $rOpts->{'logfile-gap'}
: 50; : 50;
if ( $logfile_gap == 0 ) { $logfile_gap = 1 } if ( $logfile_gap == 0 ) { $logfile_gap = 1 }
my $filename_stamp = $display_name ? $display_name . ':' : "??";
my $input_stream_name = $display_name ? $display_name : "??";
return bless { return bless {
_log_file => $log_file, _log_file => $log_file,
_logfile_gap => $logfile_gap, _logfile_gap => $logfile_gap,
_rOpts => $rOpts, _rOpts => $rOpts,
_fh_warnings => $fh_warnings, _fh_warnings => $fh_warnings,
_last_input_line_written => 0, _last_input_line_written => 0,
_at_end_of_file => 0, _at_end_of_file => 0,
_use_prefix => 1, _use_prefix => 1,
_block_log_output => 0, _block_log_output => 0,
_line_of_tokens => undef, _line_of_tokens => undef,
_output_line_number => undef, _output_line_number => undef,
_wrote_line_information_string => 0, _wrote_line_information_string => 0,
_wrote_column_headings => 0, _wrote_column_headings => 0,
_warning_file => $warning_file, _warning_file => $warning_file,
_warning_count => 0, _warning_count => 0,
_complaint_count => 0, _complaint_count => 0,
_saw_code_bug => -1, # -1=no 0=maybe 1=for sure _saw_code_bug => -1, # -1=no 0=maybe 1=for sure
_saw_brace_error => 0, _saw_brace_error => 0,
_saw_extrude => $saw_extrude, _saw_extrude => $saw_extrude,
_output_array => [], _output_array => [],
_filename_stamp => $display_name ? $display_name . ':' : "", _input_stream_name => $input_stream_name,
_filename_stamp => $filename_stamp,
}, $class; }, $class;
} }
sub get_input_stream_name {
my $self = shift;
return $self->{_input_stream_name};
}
sub get_warning_count { sub get_warning_count {
my $self = shift; my $self = shift;
return $self->{_warning_count}; return $self->{_warning_count};
} }
sub get_use_prefix { sub get_use_prefix {
my $self = shift; my $self = shift;
return $self->{_use_prefix}; return $self->{_use_prefix};
} }
 End of changes. 4 change blocks. 
6 lines changed or deleted 14 lines changed or added

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