Skip Menu |

This queue is for tickets about the Carp-Clan CPAN distribution.

Report information
The Basics
Id: 50560
Status: resolved
Priority: 0/
Queue: Carp-Clan

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

Bug Information
Severity: Normal
Broken in:
  • 5.1
  • 5.10
  • 5.2
  • 5.3
  • 5.8
  • 5.9
  • 6.00
Fixed in: (no value)



Subject: Duplicate prefixes in error messages e.g. in Date::Calc & Date::Pcalc
Carp::Clan usually prepends the qualified name of the function which throws the error to the given error message. Example: My::Module::Function(): complains about something in file.pl at line 5 The problem arises when some modules also put the qualified name of the function (or method) concerned into their messages, such as e.g. Date::Calc and Date::Pcalc. Example: Show quoted text
>perl -MDate::Pcalc=:all -e "Calendar(0,0,0,0,0)"
This currently prints this: Date::Pcalc::Calendar(): Usage: Date::Pcalc::Calendar($year,$month[,$orthodox[,$lang]]) at -e line 1 When it should really print this: Usage: Date::Pcalc::Calendar($year,$month[,$orthodox[,$lang]]) at -e line 1 The duplication of the qualified function name is annoying and ugly. So Carp::Clan should be patched to only prepend this qualified function name if the error message does not already contain it (anywhere in the string). The necessary patch is appended here. I will also submit the new version of Carp::Clan 6.01 to CPAN.
Subject: patch
Download patch
application/octet-stream 1.4k

Message body not shown because it is not plain text.

Resolved in version 6.01