Skip Menu |
 

This queue is for tickets about the DateTime-Event-NameDay CPAN distribution.

Report information
The Basics
Id: 40834
Status: new
Priority: 0/
Queue: DateTime-Event-NameDay

People
Owner: Nobody in particular
Requestors: J2N-FORGET [...] orange.fr
Cc:
AdminCc:

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



Download (untitled) / with headers
text/plain 238b
The attached patch solves a few problems: -- "*" a the beginning of a regexp -- "my" variables hiding other "my" variables in the test scripts -- use of infinite dates in DateTime::Recurrence, which causes the 02set.t script to fail.
Subject: dt-e-nameday.patch
Download dt-e-nameday.patch
text/x-diff 2.9k
Only in DateTime-Event-NameDay-0.03: Build diff -u -r DateTime-Event-NameDay-0.02/Changes DateTime-Event-NameDay-0.03/Changes --- DateTime-Event-NameDay-0.02/Changes 2003-04-27 04:02:06.000000000 +0200 +++ DateTime-Event-NameDay-0.03/Changes 2008-11-11 17:49:15.000000000 +0100 @@ -1,3 +1,13 @@ +0.03 2008-xx-xx + +- Fix the regexp starting with /^* +- Fix test scripts, so that "my" variables do not hide other "my" variables +- Fix _make_recurrence, to deal with infinite dates + +0.02 2003-04-27 + +- Second release + 0.01 2003-04-26 -- First release \ No newline at end of file +- First release Only in DateTime-Event-NameDay-0.03: _build diff -u -r DateTime-Event-NameDay-0.02/lib/DateTime/Event/NameDay.pm DateTime-Event-NameDay-0.03/lib/DateTime/Event/NameDay.pm --- DateTime-Event-NameDay-0.02/lib/DateTime/Event/NameDay.pm 2003-05-27 14:04:07.000000000 +0200 +++ DateTime-Event-NameDay-0.03/lib/DateTime/Event/NameDay.pm 2008-11-11 17:29:17.000000000 +0100 @@ -179,6 +179,8 @@ sub _make_recurrence { my ($last, $reform_date, $month, $day, $direction, $date_args) = @_; + return $last if $last->is_infinite; + my $dt = DateTime::Calendar::Christian->from_object (object => $last, reform_date => $reform_date, @@ -270,7 +272,7 @@ # Split the names apart and store the forward mapping # For the moment remove the * indicating holidays $names =~ s/\s+$//; - my @names = map { s/^*//; $_ } split /\s*,\s*/, $names; + my @names = map { s/^\*//; $_ } split /\s*,\s*/, $names; $forward->{$month}{$day} = \@names; # Store the reverse mapping diff -u -r DateTime-Event-NameDay-0.02/t/01names.t DateTime-Event-NameDay-0.03/t/01names.t --- DateTime-Event-NameDay-0.02/t/01names.t 2003-05-07 04:56:13.000000000 +0200 +++ DateTime-Event-NameDay-0.03/t/01names.t 2008-11-11 16:33:35.000000000 +0100 @@ -27,8 +27,8 @@ my $names = join ":", @names; is( $names, 'Alfred:Alfrida', 'class sub get_daynames' ); - my @names = $nameday->get_daynames(country => 'sweden', + @names = $nameday->get_daynames(country => 'sweden', date => $dt3); - my $names = join ":", @names; + $names = join ":", @names; is( $names, 'Alfred:Alfrida', 'class sub get_daynames before reform ('.$dt3->ymd.')' ); } diff -u -r DateTime-Event-NameDay-0.02/t/04constructor.t DateTime-Event-NameDay-0.03/t/04constructor.t --- DateTime-Event-NameDay-0.02/t/04constructor.t 2003-05-11 04:39:00.000000000 +0200 +++ DateTime-Event-NameDay-0.03/t/04constructor.t 2008-11-11 16:34:13.000000000 +0100 @@ -29,8 +29,8 @@ my $names = join ":", @names; is( $names, 'Alfred:Alfrida', 'class sub get_daynames' ); - my @names = $nameday->get_daynames(country => 'sweden', + @names = $nameday->get_daynames(country => 'sweden', date => $dt3); - my $names = join ":", @names; + $names = join ":", @names; is( $names, 'Alfred:Alfrida', 'class sub get_daynames before reform ('.$dt3->ymd.')' ); }


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.