]> git.donarmstrong.com Git - perltidy.git/commitdiff
convert print to use object call
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 1 May 2020 13:22:31 +0000 (06:22 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 1 May 2020 13:22:31 +0000 (06:22 -0700)
lib/Perl/Tidy/Debugger.pm

index 38d431fab627a339124c8794c18e086a4a6c6695..74ec61239e8e61cad2d0af37939842f4f0db53c2 100644 (file)
@@ -33,8 +33,8 @@ sub really_open_debug_file {
     }
     $self->{_debug_file_opened} = 1;
     $self->{_fh}                = $fh;
-    print $fh
-      "Use -dump-token-types (-dtt) to get a list of token type codes\n";
+    $fh->print(
+        "Use -dump-token-types (-dtt) to get a list of token type codes\n");
     return;
 }
 
@@ -68,7 +68,6 @@ sub write_debug_entry {
 
     my $input_line_number = $line_of_tokens->{_line_number};
     my $line_type         = $line_of_tokens->{_line_type};
-    ##my $rtoken_array      = $line_of_tokens->{_token_array};
 
     my ( $j, $num );
 
@@ -76,9 +75,6 @@ sub write_debug_entry {
     my $reconstructed_original = "$input_line_number: ";
     my $block_str              = "$input_line_number: ";
 
-    #$token_str .= "$line_type: ";
-    #$reconstructed_original .= "$line_type: ";
-
     my $pattern   = "";
     my @next_char = ( '"', '"' );
     my $i_next    = 0;
@@ -104,7 +100,7 @@ sub write_debug_entry {
         # This can only happen if a programming error has been made
         # because all valid tokens are non-blank
         if ( $type_str eq ' ' ) {
-            print $fh "BLANK TOKEN on the next line\n";
+            $fh->print("BLANK TOKEN on the next line\n");
             $type_str = $next_char[$i_next];
             $i_next   = 1 - $i_next;
         }
@@ -116,12 +112,11 @@ sub write_debug_entry {
     }
 
     # Write what you want here ...
-    # print $fh "$input_line\n";
-    # print $fh "$pattern\n";
-    print $fh "$reconstructed_original\n";
-    print $fh "$token_str\n";
+    # $fh->print "$input_line\n";
+    # $fh->print "$pattern\n";
+    $fh->print("$reconstructed_original\n");
+    $fh->print("$token_str\n");
 
-    #print $fh "$block_str\n";
     return;
 }
 1;