Skip Menu |

This queue is for tickets about the Date-Calc-XS CPAN distribution.

Report information
The Basics
Id: 60233
Status: open
Priority: 0/
Queue: Date-Calc-XS

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

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



Subject: Decode_Month($1) does not work
Date: Wed, 11 Aug 2010 15:50:48 +0900
To: bug-Date-Calc-XS [...] rt.cpan.org
From: Ansgar Burchardt <ANSGAR [...] cpan.org>
Hi, I'm forwarding a bug report from Debian [1] that is still reproducible with Date::Calc 6.3 and Date::Calc::XS 6.2 I just installed from CPAN: Using $1 as a parameter for Decode_Month (and likely other functions) does not work. The following code fails: use Date::Calc qw( Decode_Month ); "Oct" =~ /(.*)/; Decode_Month($1); with this message: Date::Calc::Decode_Month(): argument is not a string at -e line 1. This is specific to the XS version and using $<digits> instead of a string, that is Decode_Month($1) does not work, but Decode_Month("$1") works fine. Regards, Ansgar [1] <http://bugs.debian.org/558272>
Subject: [PATCH] Re: [rt.cpan.org #60233] Decode_Month($1) does not work
Date: Thu, 26 Aug 2010 22:46:25 +0900
To: bug-Date-Calc-XS [...] rt.cpan.org
From: Ansgar Burchardt <ANSGAR [...] cpan.org>
Hi, Show quoted text
> I'm forwarding a bug report from Debian [1] that is still reproducible > with Date::Calc 6.3 and Date::Calc::XS 6.2 I just installed from CPAN: > > Using $1 as a parameter for Decode_Month (and likely other functions) > does not work. The following code fails: > > use Date::Calc qw( Decode_Month ); > "Oct" =~ /(.*)/; > Decode_Month($1); > > [1] <http://bugs.debian.org/558272>
I have prepared a patch that seems to solve this problem by relaxing the requirements of the DATECALC_STRING macro. The patch also includes a test case. Please consider applying it. I plan to apply this patch to Debian's version of Date::Calc (we still have Date::Calc 6.0 where the XS code was not yet moved to a separate distribution). Regards, Ansgar

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

Subject: Re: [PATCH] Re: [rt.cpan.org #60233] Decode_Month($1) does not work
Date: Thu, 26 Aug 2010 22:54:20 +0900
To: bug-Date-Calc-XS [...] rt.cpan.org
From: Ansgar Burchardt <ansgar [...] 43-1.org>
Show quoted text
> I have prepared a patch that seems to solve this problem by relaxing the > requirements of the DATECALC_STRING macro. The patch also includes a > test case. Please consider applying it.
And now with the patch attached... Regards, Ansgar

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