Skip Menu |
 

This queue is for tickets about the Carp CPAN distribution.

Report information
The Basics
Id: 132281
Status: new
Priority: 0/
Queue: Carp

People
Owner: Nobody in particular
Requestors: ulrich.windl [...] rz.uni-regensburg.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.38
Fixed in: (no value)



Subject: Improve documentation on %Carp::Internal
Download (untitled) / with headers
text/plain 972b
(I cannot select VERSION 1.42 as found in OpenSUSE Leap 15.1 perl-base-5.26.1-lp151.9.3.1.x86_64) Fighting to suppress some entries in confess()'s call stack, I noticed that the documentation is kind of poor: --- %Carp::Internal This says what packages are internal to Perl. "Carp" will never report an error as being from a line in a package that is internal to Perl. For example: $Carp::Internal{ (__PACKAGE__) }++; # time passes... sub foo { ... or confess("whatever") }; would give a full stack backtrace starting from the first caller outside of __PACKAGE__. (Unless that package was also internal to Perl.) --- The specification is per example only, and it seems the implementation is using "$Internal{$call_pack}" as condition instead of "exists($Internal{$call_pack})". So "$Carp::Internal{(__PACKAGE__)} = undef" does not work, while "$Carp::Internal{(__PACKAGE__)} = 1" works.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.