(my $PODFILE) = ((grep { -e } @trypod), $trypod[$#trypod])[0];
$DEBUG ||= 0;
-my $WHOAMI = ref bless []; # nobody's business, prolly not even mine
local $| = 1;
local $_;
if (caller) {
INCPATH: {
- for my $file ( (map { "$_/$WHOAMI.pm" } @INC), $0) {
+ for my $file ( (map { "$_/".__PACKAGE__.".pm" } @INC), $0) {
warn "Checking $file\n" if $DEBUG;
if (open(POD_DIAG, $file)) {
while (<POD_DIAG>) {
$transfmt{$header}{len} = length( $header );
}
- print STDERR "$WHOAMI: Duplicate entry: \"$header\"\n"
+ print STDERR __PACKAGE__.": Duplicate entry: \"$header\"\n"
if $msg{$header};
$msg{$header} = '';
sub warn_trap {
my $warning = $_[0];
- if (caller eq $WHOAMI or !splainthis($warning)) {
+ if (caller eq __PACKAGE__ or !splainthis($warning)) {
if ($WARNTRACE) {
print STDERR Carp::longmess($warning);
} else {
}
splainthis($exception) unless $in_eval;
- if (caller eq $WHOAMI) { print STDERR "INTERNAL EXCEPTION: $exception"; }
+ if (caller eq __PACKAGE__) {
+ print STDERR "INTERNAL EXCEPTION: $exception";
+ }
&$olddie if defined $olddie and $olddie and $olddie ne \&death_trap;
return if $in_eval;