Skip Menu |

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

Report information
The Basics
Id: 6405
Status: resolved
Priority: 0/
Queue: DateTime-Event-ICal

People
Owner: FGLOCK [...] cpan.org
Requestors: balmas [...] ovid.com
Cc:
AdminCc:

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



Subject: hang creating biweekly intervals with sunday start
Using Perl v5.8.0 on Sun DateTime::Event::ICal version .07 The following code just hangs when attempting to create the ICal set: #!/usr/local/bin/perl use strict; use Time::Local; use DateTime; use DateTime::Event::ICal; my $dt = DateTime->new( year => '2004', month => '05', day => '23', time_zone => 'GMT'); my $set = DateTime::Event::ICal->recur(dtstart => $dt, count => 2, freq => 'weekly', interval => 2, byday => [ 'mo' ] ); my $nextDt = $set->next($dt); print $nextDt->datetime . "\n"; Changing start day to any day other than a Sunday succeeds, and not all Sundays fail .. but for this example, 5/23 and 5/09 hang every time. I've tried this pattern with other days (for example, where the byday value is 'we' and dtstart is 5/25) and can't get it to fail, but haven't tried them all, so I'm not sure if it's limited to Sunday starts or not. It also succeeds if I remove the interval.
[guest - Mon May 24 14:45:13 2004]: Clarification, it's actually the call to $set->next that's hanging. Show quoted text
> Using Perl v5.8.0 on Sun > DateTime::Event::ICal version .07 > > The following code just hangs when attempting to create the ICal set: > > #!/usr/local/bin/perl > use strict; > > use Time::Local; > use DateTime; > use DateTime::Event::ICal; > > my $dt = DateTime->new( year => '2004', > month => '05', > day => '23', > time_zone => 'GMT'); > my $set = DateTime::Event::ICal->recur(dtstart => $dt, > count => 2, > freq => 'weekly', > interval => 2, > byday => [ 'mo' ] ); > my $nextDt = $set->next($dt); > print $nextDt->datetime . "\n"; > > Changing start day to any day other than a Sunday succeeds, and not > all > Sundays fail .. but for this example, 5/23 and 5/09 hang every time. > I've > tried this pattern with other days (for example, where the byday value > is 'we' and dtstart is 5/25) and can't get it to fail, but haven't > tried > them all, so I'm not sure if it's limited to Sunday starts or not. It > also succeeds if I remove the interval.