From: Steve Hancock <perltidy@users.sourceforge.net>
Date: Wed, 6 Sep 2023 02:04:09 +0000 (-0700)
Subject: remove unused code
X-Git-Tag: 20230909~1
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4b7c67f1ed0861d5567bbf3b2c82a5c3b12a0e65;p=perltidy.git

remove unused code
---

diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm
index 93dde3b0..e1d5907d 100644
--- a/lib/Perl/Tidy/Formatter.pm
+++ b/lib/Perl/Tidy/Formatter.pm
@@ -8788,8 +8788,8 @@ sub respace_tokens_inner_loop {
                         $token =~ s/\(/ (/;
                     }
                     else {
-                        ## bad n value for -spp=n
-                        ## FIXME: this should be caught earlier
+                        # bad n value for -spp=n
+                        # just use the default
                     }
 
                     # one space max, and no tabs
diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm
index 012adca2..a2c64c75 100644
--- a/lib/Perl/Tidy/Tokenizer.pm
+++ b/lib/Perl/Tidy/Tokenizer.pm
@@ -3770,13 +3770,6 @@ EOM
         my $self = shift;
 
         # '<<' = maybe a here-doc?
-
-##      This check removed because it could be a deprecated here-doc with
-##      no specified target.  See example in log 16 Sep 2020.
-##            return
-##              unless ( $i < $max_token_index )
-##              ;          # here-doc not possible if end of line
-
         if ( $expecting != OPERATOR ) {
             my ( $found_target, $here_doc_target, $here_quote_character,
                 $saw_error );
@@ -3895,7 +3888,7 @@ EOM
 
             # Target not found, expecting==UNKNOWN
             else {
-                ## syntax error? FIXME: probably should write error msg
+                $self->warning("didn't find here doc target after '<<~'\n");
             }
         }
         else {
@@ -6392,14 +6385,6 @@ sub code_block_type {
         return $last_nonblank_token;
     }
 
-    # or a sub alias
-    # FIXME: see if this is really needed after the c250 update
-    elsif (( $last_nonblank_type eq 'i' || $last_nonblank_type eq 't' )
-        && ( $is_sub{$last_nonblank_token} ) )
-    {
-        return 'sub';
-    }
-
     elsif ( $statement_type =~ /^(sub|package)\b/ ) {
         return $statement_type;
     }
@@ -9908,11 +9893,6 @@ sub follow_quoted_string {
             }
             my $old_pos = $quote_pos;
 
-##          NOTE: OLD Code with did nothing - leftover from debugging?
-##          unless ( defined($tok) && defined($end_tok) && defined($quote_pos) )
-##          {
-
-##          }
             $quote_pos = 1 + index( $tok, $end_tok, $quote_pos );
 
             if ( $quote_pos > 0 ) {