From: Steve Hancock Date: Fri, 18 Sep 2020 00:52:50 +0000 (-0700) Subject: added AUTOLOAD subs X-Git-Tag: 20201001~32 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=571eb9122f2bee22888c8b0a921792b781d55a95;p=perltidy.git added AUTOLOAD subs --- diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 45e6fa23..7362dc17 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -22,6 +22,29 @@ use strict; use warnings; our $VERSION = '20200907.01'; +sub AUTOLOAD { + + # Catch any undefined sub calls so that we are sure to get + # some diagnostic information. This sub should never be called + # except for a programming error. + our $AUTOLOAD; + return if ( $AUTOLOAD eq 'DESTROY' ); + my ( $pkg, $fname, $lno ) = caller(); + print STDERR <_decrement_count(); diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 9bf5520f..50de123e 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -67,6 +67,25 @@ our $VERSION = '20200907.01'; return $self; } + sub AUTOLOAD { + + # Catch any undefined sub calls so that we are sure to get + # some diagnostic information. This sub should never be called + # except for a programming error. + our $AUTOLOAD; + return if ($AUTOLOAD eq 'DESTROY'); + my ( $pkg, $fname, $lno ) = caller(); + print STDERR <_decrement_count();