This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Carp: distinguish deleted stash from top of stack
authorRicardo Signes <rjbs@cpan.org>
Wed, 1 May 2013 15:41:50 +0000 (11:41 -0400)
committerRicardo Signes <rjbs@cpan.org>
Thu, 2 May 2013 02:25:20 +0000 (22:25 -0400)
commitc541cacff57e9d56d6e7adcf6c70754b2cda5b0c
treec3b8919b463eab1d1efcda2275edaacc625c1fc2
parent0d8492ed50b289c6357fee4ad2c7d5c574e2df14
Carp: distinguish deleted stash from top of stack

The change to work with deleted stashes broke the behavior of Carp
at the top of the stack.

This change distinguishes between the two cases: at the top of the
stack, caller(1) returns ().  If the stash has been deleted, it
returns a populated list with an undefined package name.  The test
used here is to check for a defined line number, which should be
sufficient.
dist/Carp/lib/Carp.pm
dist/Carp/lib/Carp/Heavy.pm