From 571eb9122f2bee22888c8b0a921792b781d55a95 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 17 Sep 2020 17:52:50 -0700 Subject: [PATCH] added AUTOLOAD subs --- lib/Perl/Tidy/Diagnostics.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/FileWriter.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/IOScalar.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/IOScalarArray.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/IndentationItem.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/LineBuffer.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/LineSink.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/LineSource.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/Logger.pm | 23 ++++++++++++++++++++++ lib/Perl/Tidy/VerticalAligner/Alignment.pm | 19 ++++++++++++++++++ lib/Perl/Tidy/VerticalAligner/Line.pm | 19 ++++++++++++++++++ 11 files changed, 245 insertions(+) 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(); -- 2.39.5