]> git.donarmstrong.com Git - perltidy.git/commitdiff
improved efficiency of some routines in FileWriter.pm
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 6 Oct 2020 13:05:50 +0000 (06:05 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 6 Oct 2020 13:05:50 +0000 (06:05 -0700)
lib/Perl/Tidy/FileWriter.pm

index 32114e39bbaba12b47efa0385410658b096a2d60..fa3e23f99eb5d6a5bcbccd56883778c84c764890 100644 (file)
@@ -15,7 +15,7 @@ sub AUTOLOAD {
     # some diagnostic information.  This sub should never be called
     # except for a programming error.
     our $AUTOLOAD;
-    return if ( $AUTOLOAD =~/\bDESTROY$/ );
+    return if ( $AUTOLOAD =~ /\bDESTROY$/ );
     my ( $pkg, $fname, $lno ) = caller();
     print STDERR <<EOM;
 ======================================================================
@@ -92,24 +92,20 @@ sub new {
 }
 
 sub get_output_line_number {
-    my $self = shift;
-    return $self->[_output_line_number_];
+    return $_[0]->[_output_line_number_];
 }
 
 sub decrement_output_line_number {
-    my $self = shift;
-    $self->[_output_line_number_]--;
+    $_[0]->[_output_line_number_]--;
     return;
 }
 
 sub get_consecutive_nonblank_lines {
-    my $self = shift;
-    return $self->[_consecutive_nonblank_lines_];
+    return $_[0]->[_consecutive_nonblank_lines_];
 }
 
 sub reset_consecutive_blank_lines {
-    my $self = shift;
-    $self->[_consecutive_blank_lines_] = 0;
+    $_[0]->[_consecutive_blank_lines_] = 0;
     return;
 }