]> git.donarmstrong.com Git - perltidy.git/commitdiff
remove unused code
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 16 Jun 2022 02:39:35 +0000 (19:39 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 16 Jun 2022 02:39:35 +0000 (19:39 -0700)
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm

index ae0bfd20133dccdb443cace95b8f34a894c20b20..c418a9f91d4b344168c74f2f8f7fe5a5aa937a17 100644 (file)
@@ -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} .= <<EOM;
-Note: --syntax check will be skipped because standard output is used
-EOM
-
         }
     }
 
index 3306d6b2d4f4f58ba8abe3a923a45cadaa455212..9c56ea7c4410785083ae2d192d6ae5cdcd288f5c 100644 (file)
@@ -41,16 +41,14 @@ sub new {
     my ( $class, @args ) = @_;
 
     my %defaults = (
-        input_file               => 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} .= <<EOM;
-Note: --syntax check will be skipped because standard input is used
-EOM
-
     }
 
     return bless {
@@ -124,4 +119,3 @@ sub get_line {
     return $line;
 }
 1;
-
index 194ca81c7e3a4f824f1451b0096fad44b107fc40..b005abd9f414171d681b00b3dceb0ad6c06d8c95 100644 (file)
@@ -458,7 +458,7 @@ sub get_save_logfile {
 sub finish {
 
     # called after all formatting to summarize errors
-    my ( $self, $formatter ) = @_;
+    my ($self) = @_;
 
     my $rOpts         = $self->{_rOpts};
     my $warning_count = $self->{_warning_count};