Skip Menu |

This queue is for tickets about the Devel-Confess CPAN distribution.

Report information
The Basics
Id: 100951
Status: resolved
Priority: 0/
Queue: Devel-Confess

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

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



Subject: stripping \n from warning when other $SIG{__WARN__} in use
This code: perl -wle'use Test::Warnings ":no_end_test"; use Devel::Confess; warn "foo"' gives: foo at /Users/ether/.perlbrew/libs/21.5@std/lib/perl5/Test/Warnings.pm line 59. Test::Warnings is doing nothing here but installing a __WARN__ handler that calls warn($_[0]. The problem is that the trailing \n, along with correct location information, is being stripped by Devel::Confess. I am changing Test::Warnings to call Carp::carp($msg) if there is no newline, but I think it is an error that a message would ever hit a warning handler without this information.
Devel::Confess was intentionally splitting off the location, so it could be handled separately for some purposes, like colorizing. However, it was then passing the message and stack trace as separate options to other __WARN__ handlers, when normally those handlers only take a single argument. This is fixed in 0.007005.