Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 84767
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: olig9 [...]

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

Subject: CGI::Carp doesn't print Input Line Number in die() error message
Date: Sat, 20 Apr 2013 15:26:25 +0200
To: [...]
From: Oliver Gerlich <olig9 [...]>
Hello, thanks for the great CGI module, which is really helpful! However, I've found a minor problem when using die() while CGI::Carp is enabled, and hope that this is the right place to ask. When die() is called, the error message created by CGI::Carp will not include the Input Line Number ($.), while the error message with CGI::Carp disabled does include this information. Some example code is attached. If CGI::Carp is used, the error message from will be: [Sat Apr 20 13:09:25 2013] error at line 11. If CGI::Carp is not used, the error message will be: error at line 16, <IN> line 4. The "<IN> line 4." part is what I'm looking for. It would be useful to have this appear in the server log together with the error message. Btw. if Perl exits due to some other error, the message created by CGI::Carp does contain the input line number, eg.: Use of uninitialized value $undefVar in print at line 14, <IN> line 4. This happens with Perl 5.14.2 (from perl 5.14.2-6ubuntu2.3 package) under Ubuntu 12.04.2 32-bit. Thanks a lot, Oliver Gerlich
text/x-perl 237b

Message body is not shown because sender requested not to inline it.

Subject: Re: [ #84767] CGI::Carp doesn't print Input Line Number in die() error message
Date: Mon, 22 Apr 2013 09:47:05 -0400
To: [...]
From: Mark Stosberg <mark [...]>
I would be open to this improvement, but I'm not sure how to do it. Patch welcome. Mark
Download (untitled) / with headers
text/plain 241b
This issue has been copied to: please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Download (untitled) / with headers
text/plain 192b
CGI::Carp::die already seems to include the line number. I've added a test to verify this (t/rt-84767.t). If you can modify this test to show otherwise i would be interested. For now, closing.

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

Please report any issues with to