From c480a5d29703eb6de2b1d3b60ab6db88f6432f3c Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 15 Jun 2022 19:39:35 -0700 Subject: [PATCH] remove unused code --- lib/Perl/Tidy/LineSink.pm | 23 +++++++++-------------- lib/Perl/Tidy/LineSource.pm | 16 +++++----------- lib/Perl/Tidy/Logger.pm | 2 +- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index ae0bfd20..c418a9f9 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -41,19 +41,17 @@ sub new { my ( $class, @args ) = @_; my %defaults = ( - output_file => undef, - line_separator => undef, - rOpts => undef, - rpending_logfile_message => undef, - is_encoded_data => undef, + output_file => undef, + line_separator => undef, + rOpts => undef, + is_encoded_data => undef, ); my %args = ( %defaults, @args ); - my $output_file = $args{output_file}; - my $line_separator = $args{line_separator}; - my $rOpts = $args{rOpts}; - my $rpending_logfile_message = $args{rpending_logfile_message}; - my $is_encoded_data = $args{is_encoded_data}; + my $output_file = $args{output_file}; + my $line_separator = $args{line_separator}; + my $rOpts = $args{rOpts}; + my $is_encoded_data = $args{is_encoded_data}; my $fh = undef; @@ -71,14 +69,11 @@ sub new { if ( $output_file eq '-' || ref $output_file ) { if ( $rOpts->{'check-syntax'} ) { + # NOTE: THIS IS OLD CODING, left for safety. Should not get here. # Turning off syntax check when standard output is used. # The reason is that temporary files cause problems on # on many systems. $rOpts->{'check-syntax'} = 0; - ${$rpending_logfile_message} .= < undef, - rOpts => undef, - rpending_logfile_message => undef, + input_file => undef, + rOpts => undef, ); my %args = ( %defaults, @args ); - my $input_file = $args{input_file}; - my $rOpts = $args{rOpts}; - my $rpending_logfile_message = $args{rpending_logfile_message}; + my $input_file = $args{input_file}; + my $rOpts = $args{rOpts}; my $input_line_ending; if ( $rOpts->{'preserve-line-endings'} ) { @@ -65,15 +63,12 @@ sub new { if ( ( $input_file eq '-' || ref $input_file ) && $rOpts->{'check-syntax'} ) { + # NOTE: THIS IS OLD CODING, left for safety. Should not get here. # Turning off syntax check when input output is used. # The reason is that temporary files cause problems on # on many systems. $rOpts->{'check-syntax'} = 0; - ${$rpending_logfile_message} .= <{_rOpts}; my $warning_count = $self->{_warning_count}; -- 2.39.5