On Tue, 17 Sep 2002, Alex Rice wrote: > This script:
Ok, I'm now more or less reproducing the output you're getting. I've got two sample ics files, one nearly empty, the other with only one or two entries in it. Running your script against each gives the following: /Users/cdevers/Desktop% more test.ics work.ics ical_test.pl ical_work.pl :::::::::::::: test.ics :::::::::::::: BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//Apple Computer\, Inc//iCal 1.0//EN X-WR-CALNAME;VALUE=TEXT:Work X-WR-TIMEZONE;VALUE=TEXT:US/Eastern VERSION:2.0 METHOD:PUBLISH END:VCALENDAR :::::::::::::: work.ics :::::::::::::: BEGIN:VCALENDAR CALSCALE:GREGORIAN X-WR-TIMEZONE;VALUE=TEXT:US/Eastern METHOD:PUBLISH PRODID:-//Apple Computer\, Inc//iCal 1.0//EN X-WR-CALNAME;VALUE=TEXT:Work VERSION:2.0 BEGIN:VEVENT SEQUENCE:2 DTSTAMP:20020912T051808Z SUMMARY:Taconda meeting UID:0684EDC3-CAC1-11D6-B095-0030657A4262 DTSTART;TZID=US/Eastern:20020912T110000 DURATION:PT1H END:VEVENT BEGIN:VEVENT SEQUENCE:2 DTSTAMP:20020912T051827Z SUMMARY:Globe tech meetup DTEND;TZID=US/Eastern:20020912T141500 UID:0684F334-CAC1-11D6-B095-0030657A4262 DTSTART;TZID=US/Eastern:20020912T130000 END:VEVENT BEGIN:VEVENT SEQUENCE:1 DTSTAMP:20020918T043854Z SUMMARY:Yellowpepper SMS meeting UID:0684F7AB-CAC1-11D6-B095-0030657A4262 DTSTART;TZID=US/Eastern:20020918T130000 DURATION:PT1H DESCRIPTION:cancelled BEGIN:VALARM ATTENDEE:mailto:[EMAIL PROTECTED] TRIGGER;VALUE=DURATION:-PT15M ACTION:EMAIL SUMMARY:Alarm notification DESCRIPTION:This is an event reminder END:VALARM END:VEVENT END:VCALENDAR :::::::::::::: ical_test.pl :::::::::::::: #!/usr/bin/perl use Net::ICal; $icalStr = `cat /Users/cdevers/Desktop/test.ics`; my $cal = Net::ICal::Calendar->new_from_ical($icalStr) || die $!; :::::::::::::: ical_work.pl :::::::::::::: #!/usr/bin/perl use Net::ICal; $icalStr = `cat /Users/cdevers/Desktop/work.ics`; my $cal = Net::ICal::Calendar->new_from_ical($icalStr) || die $!; /Users/cdevers/Desktop% ./ical_test.pl /Users/cdevers/Desktop% ./ical_work.pl Invalid duration: seconds at /Library/Perl/Net/ICal/Component.pm line 697 MethodMapper: Can't invoke _create on Net::ICal::Duration at /Library/Perl/Net/ICal/Property.pm line 135 Can't call method "restore" on an undefined value at /Library/Perl/Net/ICal/Property.pm line 178. /Users/cdevers/Desktop% Note that the test version [with no data] seems to create the object silently, but the one with data in it fails, as yours did, with an error about line 697 of .../Net/ICal/Component.pm. I'll have to try this again on Linux tomorrow... -- Chris Devers Have you ever seen Jack Valenti & John Ashcroft at the same time?