From e658648804e5e0282f4d8037f9614c1216ea6baf Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 20 Oct 2020 16:37:14 -0700 Subject: [PATCH] updated sub AUTOLOAD --- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 20 ++++++++++---------- lib/Perl/Tidy/VerticalAligner/Line.pm | 5 +---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 08afc517..74525b13 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -23,10 +23,8 @@ use constant { }; sub new { - my ( $caller, %arg ) = @_; - my $caller_is_obj = ref($caller); - my $class = $caller_is_obj || $caller; - my $self = bless [], $class; + my ( $class, %arg ) = @_; + my $self = bless [], $class; $self->[_column_] = $arg{column}; $self->[_starting_column_] = $arg{starting_column}; $self->[_saved_column_] = $arg{saved_column}; @@ -44,13 +42,15 @@ sub AUTOLOAD { our $AUTOLOAD; return if ( $AUTOLOAD =~ /\bDESTROY$/ ); my ( $pkg, $fname, $lno ) = caller(); + my $my_package = __PACKAGE__; print STDERR <[_jmax_] = $arg{jmax}; -- 2.39.5