Skip Menu |

This queue is for tickets about the Tie-iCal CPAN distribution.

Maintainer(s)' notes

The latest code (work in progress) is in a Git repository here: https://github.com/dolmen/p5-Tie-iCal

   git clone --origin upstream git://github.com/dolmen/p5-Tie-iCal.git Tie-iCal

The best way to submit patches is to create a new branch from the Git repo, fork it on Github and push your branch, and submit a pull request. But old-style patches attached to a ticket here are fine too.

Report information
The Basics
Id: 82404
Status: new
Priority: 0/
Queue: Tie-iCal

People
Owner: Nobody in particular
Requestors: SKA [...] cpan.org
Cc:
AdminCc:

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



Subject: Use of uninitialized value $valueFragments[0] in join
When you have a line like: LOCATION: (note the empty value) in the ics file, you get the warning: Use of uninitialized value $valueFragments[0] in join or string at /usr/share/perl5/Tie/iCal.pm line 548, <$fh> line 866. Attached patch checks for this condition and replaces the undef value in @valueFragments with an empty string. Kind regards, ska
Subject: tie-ical__empty-body.patch
--- /tmp/iCal.pm 2013-01-04 13:58:15.544972766 +0100 +++ /usr/share/perl5/Tie/iCal.pm 2013-01-04 13:55:54.224977162 +0100 @@ -538,10 +538,13 @@ $e{$name} = [{%params}, @values]; } } elsif ($contentLine =~ /^[\w-]+:.*$/s) { # we don't have params my ($name, @valueFragments) = &parse_line(':', $contentLine); my @values; + if(scalar(@valueFragments) == 1 && !defined($valueFragments[0])) { + $valueFragments[0] = ''; + } if ($name eq 'RRULE') { my @params = &parse_line(';', join(':', @valueFragments)); my %params = map { my ($p, $v) = split(/=/, $_); $p => $v =~ /,/ ? [split(/,/,$v)] : $v } @params; push @values, {%params}; } else {