Skip Menu |

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

Report information
The Basics
Id: 2131
Status: new
Priority: 0/
Queue: Net-ICal

People
Owner: Nobody in particular
Requestors: chris [...] clotho.com
Cc:
AdminCc:

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



Subject: Net::ICal::Time::add() broken
The add() method in Net::ICal::Time overrides the Date::ICal method of the same name, but it changes the calling sequence significantly, causing breakage. Net:ICal expects a single argument (duration) while Date::ICal expects multiple arguments, in pairs. Here's a cluck() stacktrace which shows how the Date::ICal::offset method calls back into Net::ICal::Time::add with arguments that are mishandled. Invalid duration: seconds at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 697 Date::ICal::duration_value('seconds') called at /perl/lib/site_perl/5.8.0/Date/ICal.pm line 587 Date::ICal::_add('undef','undef') called at /perl/lib/site_perl/5.8.0/Date/ICal.pm line 552 Date::ICal::add('Net::ICal::Time=HASH(0x61977c)','duration','seconds') called at /perl/lib/site_perl/5.8.0/Net/ICal/Time.pm line 208 Net::ICal::Time::add('Net::ICal::Time=HASH(0x61977c)','seconds',21600) called at /perl/lib/site_perl/5.8.0/Date/ICal.pm line 482 Date::ICal::offset('Net::ICal::Time=HASH(0x61977c)',-0600) called at /perl/lib/site_perl/5.8.0/Date/ICal.pm line 226 Date::ICal::new('Net::ICal::Time','ical',20030118) called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 697 Net::ICal::Component::_load_property('Net::ICal::Time',20030118,'DTSTART;VALUE=DATE:20030118') called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 576 Net::ICal::Component::__ANON__('Net::ICal::Event=HASH(0x613e9c)') called at /perl/lib/site_perl/5.8.0/Class/MethodMapper.pm line 463 Class::MethodMapper::restore('Net::ICal::Event=HASH(0x613e9c)','CODE(0x618450)') called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 601 Net::ICal::Component::_parse_lines('ARRAY(0x235a6c)') called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 504 Net::ICal::Component::__ANON__('Net::ICal::Calendar=HASH(0x15ebc)') called at /perl/lib/site_perl/5.8.0/Class/MethodMapper.pm line 463 Class::MethodMapper::restore('Net::ICal::Calendar=HASH(0x15ebc)','CODE(0x5c54a4)') called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 601 Net::ICal::Component::_parse_lines('ARRAY(0x235a6c)') called at /perl/lib/site_perl/5.8.0/Net/ICal/Component.pm line 145 Net::ICal::Component::new_from_ical('Net::ICal::Calendar','BEGIN:VCALENDAR\x{a}CALSCALE:GREGORIAN\x{a}PRODID:-//Apple Computer\,...') called at cal.cgi line 50
From: chris [...] clotho.com
Attached is a patch against 0.15 that resolves this bug. I *think* I accounted for backward compatibility properly.
Download diff2
application/octet-stream 2.2k

Message body not shown because it is not plain text.