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: 14927
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: cpan [...] steffen-winkler.de
Cc:
AdminCc:

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



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.417 (Entity 5.417)
Subject: CGI::Carp::croak caller stack missing
X-RT-Original-Encoding: iso-8859-1
Content-Length: 144
Download (untitled) / with headers
text/plain 144b
If I use Carp croak shoes the caller stack. Then I write a CGI-Application and Carp is different, why? So I can't find errors croak is like die.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-6413-1248129932-1610.14927-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 649
Download (untitled) / with headers
text/plain 649b
On Wed Oct 05 04:55:26 2005, STEFFENW wrote: Show quoted text
> If I use Carp croak shoes the caller stack. > Then I write a CGI-Application and Carp is different, why? > So I can't find errors croak is like die.
I'm sorry it took almost 4 years to get a reply through the bug tracker. I think your experience is due to the interaction between Carp and CGI::Carp. I'm marking this bug as "rejected" for now because no one else has complained in the last 4 years, and I don't think it's a CGI bug. If there's still something you'd like changed in CGI.pm, please submit a Test::More style test case which illustrates it, or other steps to reproduce it. Mark
MIME-Version: 1.0
X-Spam-Status: No, hits=-0.0 required=8.0 tests=SPF_PASS
In-Reply-To: <rt-3.6.HEAD-6413-1248129932-1610.14927-6-0 [...] rt.cpan.org>
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Authenticated: #2313740
X-Provags-ID: V01U2FsdGVkX1+IDq4v8D2IvpRluoibZwktGQfnfJxvvvfCSIHDJM MPIfd8EJff2jqsvtAFWrYXrFnZTXliYzyk7g==
References: <RT-Ticket-14927 [...] rt.cpan.org> <rt-3.6.HEAD-6413-1248129932-1610.14927-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <20090824192637.47370 [...] gmx.net>
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 748C919B82C4 for <bug-CGI.pm [...] rt.cpan.org>; Mon, 24 Aug 2009 15:26:50 -0400 (EDT)
Received: (qmail 8968 invoked by uid 103); 24 Aug 2009 19:26:49 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 24 Aug 2009 19:26:49 -0000
Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by 16.mx.develooper.com (qpsmtpd/0.80) with SMTP; Mon, 24 Aug 2009 12:26:43 -0700
Received: (qmail 4048 invoked by uid 0); 24 Aug 2009 19:26:39 -0000
Received: from 84.57.64.55 by www103.gmx.net with HTTP; Mon, 24 Aug 2009 21:26:37 +0200 (CEST)
Delivered-To: cpan-bug+CGI.pm [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #14927] CGI::Carp::croak caller stack missing
X-GMX-Uid: PZ33OulzZCEEc2I0RmwhF094IGhpZYZY
Return-Path: <steffen.winkler [...] gmx.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-CGI.pm [...] rt.cpan.org
X-Flags: 0001
X-Priority: 3
Date: Mon, 24 Aug 2009 21:26:37 +0200
X-Spam-Level: *
X-Fuhafi: 0.55
To: bug-CGI.pm [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Steffen Winkler" <steffen.winkler [...] gmx.net>
RT-Message-ID: <rt-3.6.HEAD-30017-1251142024-1108.14927-0-0 [...] rt.cpan.org>
Content-Length: 3182
Download (untitled) / with headers
text/plain 3.1k
Code ---- use strict; use warnings; use Carp qw(carp croak confess cluck); sub ca { carp 'carp'} sub cr { eval {croak 'croak'}; print $@ } sub co { eval {confess 'confess'}; print $@ } sub cl { cluck 'cluck' } sub hr { print '-' x 60, "\n" } ca; hr; cr; hr; co; hr; cl; hr; require CGI::Carp; CGI::Carp->import(qw(carp croak)); ca; hr; cr; hr; co; hr; cl; hr; { # workaround for the silent croak no warnings qw(redefine); *croak = \&confess; } cr; hr; __END__ Output ------ carp at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 21 main::ca() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 27 ------------------------------------------------------------ croak at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 22 eval {...} called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 22 main::cr() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 29 ------------------------------------------------------------ confess at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 23 eval {...} called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 23 main::co() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 31 ------------------------------------------------------------ cluck at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 24 main::cl() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 33 ------------------------------------------------------------ [Mon Aug 24 21:25:02 2009] CGI-Carp.bat: carp at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 21 ------------------------------------------------------------ croak at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 22 ------------------------------------------------------------ confess at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 23 eval {...} called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 23 main::co() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 42 ------------------------------------------------------------ [Mon Aug 24 21:25:02 2009] CGI-Carp.bat: cluck at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 24 [Mon Aug 24 21:25:02 2009] CGI-Carp.bat: main::cl() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 44 ------------------------------------------------------------ croak at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 22 eval {...} called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 22 main::cr() called at C:\Dokumente und Einstellungen\Steffen\Desktop\CGI-Carp.bat line 53 ------------------------------------------------------------ -- steffen.winkler@gmx.net http://steffen-winkler.de/ http://www.xing.com/go/invite/3303102.73f421 Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-30017-1251142024-1108.14927-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-14927 [...] rt.cpan.org> <rt-3.6.HEAD-6413-1248129932-1610.14927-6-0 [...] rt.cpan.org> <20090824192637.47370 [...] gmx.net> <rt-3.6.HEAD-30017-1251142024-1108.14927-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-30017-1251302776-165.14927-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 401
Download (untitled) / with headers
text/plain 401b
Here is the t-script that does not fail using Carp and not CGI::Carp. --------------------------------------------------------------------- use strict; use warnings; use Test::More tests => 2; use Test::Exception; BEGIN { use_ok('CGI::Carp', qw(croak) ); } sub cr { croak 'croak' } throws_ok( sub { cr() }, qr{\A croak \s at \s .*? \s at \s}xms, 'croak shows the caller stack', );
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-30017-1251302776-165.14927-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-14927 [...] rt.cpan.org> <rt-3.6.HEAD-6413-1248129932-1610.14927-6-0 [...] rt.cpan.org> <20090824192637.47370 [...] gmx.net> <rt-3.6.HEAD-30017-1251142024-1108.14927-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-30017-1251302776-165.14927-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-30017-1251572522-1466.14927-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 333
Download (untitled) / with headers
text/plain 333b
Here's a refactor of the test that avoids the dependency on Test::Exception: ### use strict; use warnings; use Test::More 'no_plan'; use CGI::Carp 'croak'; eval { croak 'croak' }; like($@, qr{\A croak \s at \s .*? \s at \s}xms, 'croak shows the caller stack'); ### I'm still hoping someone else will provide the actual bug fix.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-21779-1358906884-658.14927-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 124
Download (untitled) / with headers
text/plain 124b
No one else has expressed interest in this since 2009 or supplied a patch, so I'm marking this as resolved-due-to-old-age.


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.