]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix AUTOLOAD handling of any DESTROY call
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 3 Oct 2020 23:05:41 +0000 (16:05 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 3 Oct 2020 23:05:41 +0000 (16:05 -0700)
14 files changed:
lib/Perl/Tidy/Diagnostics.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/HtmlWriter.pm
lib/Perl/Tidy/IOScalar.pm
lib/Perl/Tidy/IOScalarArray.pm
lib/Perl/Tidy/IndentationItem.pm
lib/Perl/Tidy/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm
lib/Perl/Tidy/VerticalAligner/Line.pm

index 1d97be6f17df1cebc0cb09fecc55c735be2ebfb3..718daf65f9f4902bb455be90698eb51328f8ce4b 100644 (file)
@@ -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 <<EOM;
 ======================================================================
index 2aa8f66e6ad575bc08939aa0defca76bda187d17..32114e39bbaba12b47efa0385410658b096a2d60 100644 (file)
@@ -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 eq 'DESTROY' );
+    return if ( $AUTOLOAD =~/\bDESTROY$/ );
     my ( $pkg, $fname, $lno ) = caller();
     print STDERR <<EOM;
 ======================================================================
index 20c9825b84b4f48c9d74ac3c26fdf7e3daa76a45..5bf2b728f688fb9b19b375ca0ccef669bd51aeba 100644 (file)
@@ -60,7 +60,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;
 ======================================================================
index 7c74c30ff856e9de10ef67b4a6b2daea2d8356a9..f59f27185817f20a0df0b8fb77861c52f002f2aa 100644 (file)
@@ -44,7 +44,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;
 ======================================================================
index 2bd94749ee29d7358dfb9dd5be71ca4537b1e43b..70154271300614db3ced96fc58d0cc634e0329af 100644 (file)
@@ -18,7 +18,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;
 ======================================================================
index e555a8eebd08da3186656f0a05b5300937f93204..66d28d5aab7fd7bcfd26eb8074c92100f231e634 100644 (file)
@@ -22,7 +22,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;
 ======================================================================
index 298f5f66805ba51ff33d5d4957b7d2ada4d5aaf6..f31ebff843da39a623cc641a7cec3daf989ecf1c 100644 (file)
@@ -39,7 +39,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;
 ======================================================================
index a44145275dd1c752cc9f1a78125ad8a9da9e9857..af2476a9693cc69b6ac6aa69620136404897f554 100644 (file)
@@ -20,7 +20,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;
 ======================================================================
index 61944eb598b0142f9341a025cda5d32de4fa8357..71794f8183cfebd75a76bf2ffb3022c9168b1d86 100644 (file)
@@ -16,7 +16,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;
 ======================================================================
index 8e6eccecd1ed80866a3639eefbef95314142b6be..faf71a0dac5a3bf93a944ae35d09ef24290a759a 100644 (file)
@@ -16,7 +16,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;
 ======================================================================
index 998811f9101cd7c99b0fbe04efb55a00231080ef..ac9c3772197d432ad65ee2be27ba634e71ad3375 100644 (file)
@@ -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 eq 'DESTROY' );
+    return if ( $AUTOLOAD =~/\bDESTROY$/ );
     my ( $pkg, $fname, $lno ) = caller();
     print STDERR <<EOM;
 ======================================================================
index 6361553323421669ac6eb56c6e478e32f63fa898..8f1b81f081cd483bc93f97bd51c4695925d263ff 100644 (file)
@@ -187,7 +187,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;
 ======================================================================
index 3d0d8a599110900abba9609546cd1574b6af44aa..d7591fd7531b68572609b2e6d08d743ebf80a2f8 100644 (file)
@@ -60,7 +60,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;
 ======================================================================
index a56ebede6836e65c963d93ad34c146e1c2362c27..611c18c0246b7fe98644cfddcb85e4b95c03cfda 100644 (file)
@@ -73,7 +73,7 @@ our $VERSION = '20201001';
         # 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;
     ======================================================================