Subject: | Data::ICal::DateTime bug with double quoting when used with Data::ICal 0.07 |
Date: | Wed, 25 Jan 2006 08:51:41 -0500 |
To: | bug-Data-ICal-DateTime [...] rt.cpan.org |
From: | Mark Stosberg <mark [...] summersault.com> |
----- Forwarded message from Mark Stosberg <mark@summersault.com> -----
Date: Wed, 25 Jan 2006 08:49:40 -0500
From: Mark Stosberg <mark@summersault.com>
To: jesse <jesse@fsck.com>
Cc: simon@thegestalt.org, sjansen@buscaluz.org
Subject: Re: [fwd] a Data::ICal::DateTime bug with double quoting
User-Agent: Mutt/1.5.6i
On Wed, Jan 25, 2006 at 02:57:14AM -0500, jesse wrote:
Show quoted text
> Thoughts?
>
>
> ----- Forwarded message from Stuart Jansen <sjansen@buscaluz.org> -----
>
> Let me begin by thanking you for working on Data::ICal. I've only begun
> to explore it, but it looks very useful.
>
> I have just updated my copy Data::ICal 0.5 to version 0.07 and it does
> not appear to be behaving correctly. Specifically, the following code
> does not appear to output the correct code.
>
> my $start = DateTime->new( year => 2005,
> month => 6, day => 22 );
> my $end = DateTime->new( year => 2005,
> month => 6, day => 25 );
> my $event = Data::ICal::Entry::Event->new();
> $event->start($start);
> $event->end($end);
> $event->summary('Test event');
> $event->description(
> 'Just,a,little;something:I\cooked up.'."\n");
> print $event->as_string();
>
> ==========
> BEGIN:VEVENT
> DESCRIPTION:Just\\,a\\,little\\;something:I\\cooked up.\n
> DTEND:20050625
> DTSTART:20050622
> SUMMARY:Test event
> END:VEVENT
> ==========
>
> I've had trouble installing Test::*, so I installed manually and haven't
> been able to run the self-tests. However, the following test code in
> 01.simplegen.t does not appear to be correct:
>
> $event->add_properties(
> summary => 'Awesome party',
> description => 'at my \ place,\nOn 5th St.;',
> );
>
> The following seems more correct:
>
> $event->add_properties(
> summary => 'Awesome party',
> description => "at my \\ place,\nOn 5th St.;",
> );
I agree, the refactoring of the test suite is more correct. However, after the change
the test suite passes just the same.
The example above failed to include a mention of Data::ICal::Datetime, which
appears to be in use here.
What has happened was that we fixed a real bug with lack of quoting in Data::ICal,
but Data::ICal::DateTime had been working around the issue by providing
quoting itself.
The result you get is double quoting.
Data::ICal::DateTime should remove this quoting, and require the newer
version of Data::ICal which provides it.
I'm copying the author of that package to address this.
Mark
Show quoted text----- End forwarded message -----
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark@summersault.com Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .