Subject: | Lacking support for multiple VCALENDARs in input file |
iCal::Parser explicitly chooses the first object returned by
Text::vFile::asData, instead of iterating through them (it is legal to
have multiple VCALENDAR items per file). The patch attached fixes this bug.
--
--kulp
Subject: | allcal.diff |
--- /usr/local/share/perl/5.8.7/iCal/Parser.pm 2006-10-19 17:21:55.000000000 -0500
+++ iCal/Parser.pm 2007-10-18 10:33:15.000000000 -0500
@@ -52,9 +52,11 @@
my $data=$parser->parse($fh);
undef $fh;
- $self->VCALENDAR($data->{objects}[0],$file);
- $self->add_objects($data->{objects}[0]);
- $self->update_recurrences;
+ for my $obj (@{ $data->{objects} }) {
+ $self->VCALENDAR($obj,$file);
+ $self->add_objects($obj);
+ $self->update_recurrences;
+ }
}
return $self->{ical};
}