Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 317771

Summary: dev-perl/Date-Calc-6.3 errors in parsing calendar profiles
Product: Gentoo Linux Reporter: Horst Prote <prote>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://rt.cpan.org/Public/Bug/Display.html?id=57169
Whiteboard:
Package list:
Runtime testing required: ---

Description Horst Prote 2010-04-29 12:59:48 UTC
After upgranding from dev-perl/Date-Calc-5.4 to dev-perl/Date-Calc-6.3 I got this error from a perl script using an german calendar profile:
  Date::Calendar::Year::new(): date '#2/Sun/May' for day 'Muttertag' is invalid ...


Reproducible: Always

Steps to Reproduce:
1. Upgrade to dev-perl/Date-Calc-6.3
2. Run this little perl script:

use Date::Calc qw(Decode_Language);
use Date::Calendar::Profiles qw($Profiles);
use Date::Calendar;
$cal = Date::Calendar::Year->new( 2010, $Profiles->{'DE-BW'}, Decode_Language("deutsch") );


Actual Results:  
Date::Calendar::Year::new(): date '#2/Sun/May' for day 'Muttertag' is invalid at - line 4


Expected Results:  
No error here

This is caused by adding the "$lang" parameter to
  &_invalid_($item,$name) unless ($dow = Decode_Day_of_Week($dow,$lang));
in line 244 of /usr/lib/perl5/vendor_perl/5.8.8/Date/Calendar/Year.pm but still using english tokens like "Sun" (in german this would be "Son") in the calendar profiles (/usr/lib/perl5/vendor_perl/5.8.8/Date/Calendar/Profiles.pm). So this may affect other languages too.

Possible fixes are:
- remove the optional "$lang" parameter (as it was in dev-perl/Date-Calc-5.4)
- change the english tokens in all affected non-english calendar profiles to thei language specific names
Comment 1 Torsten Veller (RETIRED) gentoo-dev 2010-05-03 08:19:33 UTC
Can you please report this finding upstream?

https://rt.cpan.org/Public/Dist/Display.html?Name=Date-Calc
"please report your bug by sending email to: bug-Date-Calc [at] rt.cpan.org"

Thanks
Comment 2 Horst Prote 2010-05-03 13:39:59 UTC
(In reply to comment #1)
> Can you please report this finding upstream?
Done.
Comment 3 Horst Prote 2010-05-14 13:57:15 UTC
As it turned out this is no bug (for details see the upstream link at https://rt.cpan.org/Ticket/Display.html?id=57169).