Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Locale-Maketext CPAN distribution.

Report information
The Basics
Id: 36238
Status: resolved
Priority: 0/
Queue: Locale-Maketext

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

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

Subject: [WISHLIST] DEBUG and warn (not print)
Date: Tue, 27 May 2008 23:43:23 -0300
To: "Andy Lester" <andy [...]>, bug-Locale-Maketext [...]
From: "Adriano Ferreira" <aferreira [...]>
Download (untitled) / with headers
text/plain 833b
When I tried to turn on debugging on Locale::Maketext (as in File::Findgrep with sub Locale::Maketext::DEBUG () {1} before the "use Locale::Maketext", I run into trouble in a web application because the debugging messages use the pattern DEBUG and print @message; sending the details into STDOUT. This conflicted with the app generating the HTML page into STDOUT as well. And there is a couple of details to make it hard to surpass: "print" is not overridable (so redefining it for Locale::Maketext is out of question). The attached patch turns all these debugging mechanism into: DEBUG and warn @message; "warn" is much easier to catch and there is already the $SIG{__WARN__} hook if one needs it. It also spits messages into STDERR, which makes unnecessary any modification to debug a usual web application. Best, Adriano.
Download debug-and-warn.diff
text/x-diff 9.4k

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

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

Please report any issues with to