1 #####################################################################
3 # the Perl::Tidy::VerticalAligner::Alignment class holds information
4 # on a single column being aligned
6 #####################################################################
7 package Perl::Tidy::VerticalAligner::Alignment;
11 { #<<< A non-indenting brace
13 our $VERSION = '20230309';
16 my ( $class, $rarg ) = @_;
17 my $self = bless $rarg, $class;
23 # Catch any undefined sub calls so that we are sure to get
24 # some diagnostic information. This sub should never be called
25 # except for a programming error.
27 return if ( $AUTOLOAD =~ /\bDESTROY$/ );
28 my ( $pkg, $fname, $lno ) = caller();
29 my $my_package = __PACKAGE__;
31 ======================================================================
32 Error detected in package '$my_package', version $VERSION
33 Received unexpected AUTOLOAD call for sub '$AUTOLOAD'
34 Called from package: '$pkg'
35 Called from File '$fname' at line '$lno'
36 This error is probably due to a recent programming change
37 ======================================================================
44 # required to avoid call to AUTOLOAD in some versions of perl
48 return $_[0]->{'column'};
51 sub increment_column {
52 $_[0]->{'column'} += $_[1];
58 $_[0]->{'saved_column'} = $_[0]->{'column'};
63 $_[0]->{'column'} = $_[0]->{'saved_column'};
66 } ## end of package VerticalAligner::Alignment