On Tue, 17 Sep 2002, Alex Rice wrote:

> Has anyone successfully parsed a iCal.app .ics file using Net::ICal?
> (Date::Ical does not address the entire file format, Net::ICal does)
>
> This script:
>
> #!/usr/bin/perl
> use Net::ICal;
> $icalStr = `cat /Users/alex/Library/Calendars/ARCtime.ics`;
> my $cal = Net::ICal::Calendar->new_from_ical($icalStr) || die $!;
>
> Dies with output:  [slightly cleaned up -- c.d.]
>
> Invalid duration: seconds at /Library/Perl/Net/ICal/Component.pm
>     line 697
> Invalid duration: seconds at /Library/Perl/Net/ICal/Component.pm
>     line 697
> 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.
>
> I would love to hear of any success stories or ideas what's going
> wrong here.

Any ideas, Shane?

Does anyone know of any variations between 'standard' ical format and the
version that Apple has implemented? Do all .ics files fail the same way?
Could you maybe send along the .ics file that led to this output, if this
one in particular caused problems?

Trying your script (with amended file path) is also failing for me right
now, but not the same way because I need to sort out the dependencies on
my Mac and there are two many temporal bugs to bother reporting at the
moment. Once I get all the dependencies in place I'll try again...


-- 
Chris Devers
Have you ever seen Jack Valenti &
John Ashcroft at the same time?


Reply via email to