From f1a5454cc0e2f356be8226fe08be864088275fb7 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 14 Nov 2022 18:35:18 -0800 Subject: [PATCH] remove some fixed package names from error messages --- lib/Perl/Tidy.pm | 3 ++- lib/Perl/Tidy/Formatter.pm | 4 +++- lib/Perl/Tidy/Tokenizer.pm | 4 +++- lib/Perl/Tidy/VerticalAligner.pm | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 88f7c43e..1fd935a9 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -651,6 +651,7 @@ EOM my ( $package0, $filename0, $line0, $subroutine0 ) = caller(0); my ( $package1, $filename1, $line1, $subroutine1 ) = caller(1); my ( $package2, $filename2, $line2, $subroutine2 ) = caller(2); + my $pkg = __PACKAGE__; my $input_stream_name = $rstatus->{'input_name'}; $input_stream_name = '(unknown)' unless ($input_stream_name); @@ -662,7 +663,7 @@ in file '$filename1' which was called from line $line1 of sub '$subroutine2' Message: '$msg' This is probably an error introduced by a recent programming change. -Perl::Tidy.pm reports VERSION='$VERSION'. +$pkg reports VERSION='$VERSION'. ============================================================================== EOM diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 51644838..f09a4725 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -107,6 +107,8 @@ sub Fault { my ( $package0, $filename0, $line0, $subroutine0 ) = caller(0); my ( $package1, $filename1, $line1, $subroutine1 ) = caller(1); my ( $package2, $filename2, $line2, $subroutine2 ) = caller(2); + my $pkg = __PACKAGE__; + my $input_stream_name = get_input_stream_name(); Die(<