From: Steve Hancock Date: Tue, 6 Oct 2020 13:05:50 +0000 (-0700) Subject: improved efficiency of some routines in FileWriter.pm X-Git-Tag: 20201001.01~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=16bd30aa7c0ec29962cd661518a4b7ad976eb77f;p=perltidy.git improved efficiency of some routines in FileWriter.pm --- diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 32114e39..fa3e23f9 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -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 <[_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; }