From 21ccf02c01a187fefd140cb103965565d50bcb38 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 3 Oct 2020 16:05:41 -0700 Subject: [PATCH] fix AUTOLOAD handling of any DESTROY call --- lib/Perl/Tidy/Diagnostics.pm | 2 +- lib/Perl/Tidy/FileWriter.pm | 2 +- lib/Perl/Tidy/Formatter.pm | 2 +- lib/Perl/Tidy/HtmlWriter.pm | 2 +- lib/Perl/Tidy/IOScalar.pm | 2 +- lib/Perl/Tidy/IOScalarArray.pm | 2 +- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/LineBuffer.pm | 2 +- lib/Perl/Tidy/LineSink.pm | 2 +- lib/Perl/Tidy/LineSource.pm | 2 +- lib/Perl/Tidy/Logger.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Line.pm | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 1d97be6f..718daf65 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -28,7 +28,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 <