[Omaha.pm] Fwd: iCal::Parser - or how to iterate through this hash?
Jay Hannah
jay at jays.net
Fri Feb 24 03:33:21 PST 2006
> http://search.cpan.org/~rfrankel/iCal-Parser-1.11/lib/iCal/Parser.pm
>
> {
> calendars=>[\%cal, ...],
> events=>{yyyy=>{mm=>{dd}=>{UID=>\%event}}
> todos=>[\%todo, ...]
> }
( The code above is missing a "}" after "mm". Not Brian's fault -- the author's documentation contains the error. Not encouraging when the SYNOPSIS is unusable? -grin-)
Hmmm... I know nothing about this stuff, but my 10m review makes me wonder what the point of iCal::Parser is. Looks to me like it's just turning a big ugly file into a big ugly nested complex data structure, and I'm not sure how that makes your desired task any easier... Perhaps iCal::Parser isn't the right tool for this job?
I found Net::iCal on CPAN, which looks like it might help you more? Here's an example that walks through a calendar printing stuff:
http://cvs.sourceforge.net/viewcvs.py/reefknot/Net-ICal/examples/showical.perl?rev=1.6&view=auto
Looks like Net::iCal turns those files into easier-to-use objects?
HTH,
j
More information about the Omaha-pm
mailing list