]> git.donarmstrong.com Git - perltidy.git/commitdiff
fixed DESTROY
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Oct 2020 23:13:51 +0000 (16:13 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Oct 2020 23:13:51 +0000 (16:13 -0700)
lib/Perl/Tidy/VerticalAligner/Alignment.pm

index 749be2b6d36aa5e6c0c0dd6b45410f8833df0194..70a1a6d859507a3d4b13b378331be464c8c3910d 100644 (file)
@@ -36,7 +36,7 @@ sub AUTOLOAD {
     # some diagnostic information.  This sub should never be called
     # except for a programming error.
     our $AUTOLOAD;
-    return if ( $AUTOLOAD eq 'DESTROY' );
+    return if ( $AUTOLOAD =~/\bDESTROY$/ );
     my ( $pkg, $fname, $lno ) = caller();
     print STDERR <<EOM;
     ======================================================================
@@ -49,6 +49,11 @@ EOM
     exit 1;
 }
 
+sub DESTROY {
+
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub get_column { my $self = shift; return $self->{_column} }
 
 sub get_starting_column {