From: Steve Hancock Date: Mon, 7 Sep 2020 00:59:12 +0000 (-0700) Subject: add AUTOLOAD subs to better catch programming errors X-Git-Tag: 20200907.01~51 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7e4a3a971b0f288e27d7d6541547d010ae74f3c3;p=perltidy.git add AUTOLOAD subs to better catch programming errors --- diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index a7a71819..7db691aa 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -113,6 +113,25 @@ BEGIN { $VERSION = '20200907'; } +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; + my ( $pkg, $fname, $lno ) = caller(); + print STDERR <