Add missing <fh> line # phrase to Carp messages
authortlhackque <tlhackque@yahoo.com>
Fri, 16 Dec 2011 04:48:21 +0000 (20:48 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 16 Dec 2011 05:38:02 +0000 (21:38 -0800)
commit89988fbd2f7d8a44526a3cd9ab671b3102898bc9
tree7956ff3dcc67d537b212220b08ce3d7ce3b41685
parentd47f310d69da3356f76ded4c14c2770d5f1325f4
Add missing <fh> line # phrase to Carp messages

Carp::croak is documented in the camel book as "working like die does,
except misdirecting blame to the caller."

Perldoc says "croak - die of errors (from perspective of caller)".

This is almost true, however careful inspection reveals that croak
does not include file position information ( ", <fh> line $." ) as die
does (when it can).

It turns out that it *is* possible to determine the current file han-
dle (although I wish it were easier).

Carp should do this and add it to the traceback, as it really is use-
ful information.
dist/Carp/lib/Carp.pm