Re: Class::DBI::Plugin::DateTime requires DBD::Pg?

2009-02-18 Thread Daisuke Maki

Boy, I don't even remember when/why/what that module is...

It must be one of my first ever CPAN modules.
I'm going to have to dig for the source, so please give me some time.

thanks for the heads up

--d


Rick Measham wrote:

G'day Daisuke (or anyone else helping maintain the module ..),

We've just installed your Class::DBI::Plugin::DateTime module. We're 
using it for mySQL, but it requires us to install Postgres modules. Any 
chance you can remove them from the required libs and only run the tests 
if they're installed?


DBD::Pg
DateTime::Format::Pg

Cheers!
Rick Measham




Class::DBI::Plugin::DateTime requires DBD::Pg?

2009-02-18 Thread Rick Measham

G'day Daisuke (or anyone else helping maintain the module ..),

We've just installed your Class::DBI::Plugin::DateTime module. We're 
using it for mySQL, but it requires us to install Postgres modules. Any 
chance you can remove them from the required libs and only run the tests 
if they're installed?


DBD::Pg
DateTime::Format::Pg

Cheers!
Rick Measham


smime.p7s
Description: S/MIME Cryptographic Signature


New API for DateTime formats.

2009-02-18 Thread Evan Carroll
I've creating a new API for DateTime formats using a system of Moose::Role -s.
These greatly eliminate code redundancy and help consistency. Some of
the advantages:

* We can now support Time from formats in a consistent fashion
* We can now overload any piece of the environment Locale/Timezone in
a specific call to parse_datetime
* We can now ensure builders of Formats provide the same api
(debug/defaults/locale/timezone/pattern) etc.
* We can now ensure consistency in the debugging information across all Formats
* Using MooseX::Types::DateTime we can now coerce to Timezones/Locales
from strings in an intelligent fashion consistently
* We can remove the duplication of Olsen abbreviations -> ambiguous
exception handlers by putting all of the code in one place.
* We can provide the mechanisms necessary to adapt ::Format::* to
Time-specific (dateless DateTime modules) by providing intelligent
defaults, and wrapping the call to DateTime->new with a helper
* We can disable the defaults (setting times to 0, dates to 1)
* We provide the ability to cache Locale/Timezone creation across the board.

Really it boils down to having two subs required, parse_datetime {},
and format_datetime {}, and nothing else.

There are a few more major points I'm probably still missing.

TODO: make work for 5.8, make a DateTimeX::Format::Migration to
further help those that wish to use DateTimeX::Format without any
code-additions (just deletions)

All input is appreciated

-- 
Evan Carroll
System Lord of the Internets


Re: DateTime::Format::ICal bug : DTSTART value in recurrences not converted to DateTime

2009-02-18 Thread Flavio S. Glock
This is an intentional feature - DTSTART is not an RRULE component.

An iCalendar text looks like:

 DTSTART:19870405T02
 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4

reference: http://www.ietf.org/rfc/rfc2445.txt

Flávio S. Glock

2009/2/18 Olivier Mengué :
> Hi,
>
> I have a problem with this expression (Second wednesday of every month, at
> 20:00) that I'm using with DateTime::Format::ICal->parse_recurrence() :
> FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12
>
> Here is the test case:
> perl -MDateTime::Format::ICal -e
> "DateTime::Format::ICal->parse_recurrence(recurrence=>'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12')"
> The 'start' parameter ("20090201t20z") to DateTime::Span::from_datetimes
> was a 'scalar', which is not one of the allowed types: object
>  at C:/strawberry/perl/site/lib/DateTime/Span.pm line 37
>DateTime::Span::from_datetimes(undef, 'start', '20090201t20z')
> called at C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 515
>DateTime::Event::ICal::recur('DateTime::Event::ICal', 'freq', 'monthly',
> 'byday', 'ARRAY(0x11f805c)', 'dtstart', '20090201t20z') called at
> C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 501
>DateTime::Event::ICal::recur('DateTime::Event::ICal', 'count', 12,
> 'freq', 'monthly', 'byday', 'ARRAY(0x11f805c)', 'dtstart',
> '20090201t20z', ...) called at
> C:/strawberry/perl/site/lib/DateTime/Format/ICal.pm line 173
>DateTime::Format::ICal::parse_recurrence(undef, 'recurrence',
> 'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12', 'dtstart',
> 'DateTime=HASH(0x11f772c)') called at C:/Documents and
> Settings/omengue/Documents/Eclipse/Test POE Scheduler/test-ical-recur.pl
> line 31
>
>
> It looks like a conversion of the string value of dtstart to a DateTime
> object is missing...
>
> Olivier
> http://o.mengue.free.fr/
>


DT::Locale signature breakage

2009-02-18 Thread Zefram
There is a bug in Module::Signature which is causing false signature
verification failures for DateTime::Locale.  The bug is that it attempts
to canonicalise line endings of text files for checksumming, but it does
so in a way that doesn't work on perl 5.6.  The practical upshot is that
if you have \r\n line endings then a signature generated with perl 5.8+
will fail to verify on perl 5.6.  All the XML files in tools/t/test-data
have \r\n line endings, and so suffer this problem.

There's an easy workaround: don't use \r\n.  If all the files are changed
to use \n, like the rest of the distribution, then checksums will be
computed consistently.

Of course, the principle of signing something other than what's
actually distributed is a stupid idea that opens up security
holes.  I have mentioned this to the M::S author, along with the
inconsistent-canonicalisation bug.

-zefram


DateTime::Format::ICal bug : DTSTART value in recurrences not converted to DateTime

2009-02-18 Thread Olivier Mengué
Hi,

I have a problem with this expression (Second wednesday of every month, at
20:00) that I'm using with DateTime::Format::ICal->parse_recurrence() :
FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12

Here is the test case:
perl -MDateTime::Format::ICal -e
"DateTime::Format::ICal->parse_recurrence(recurrence=>'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12')"
The 'start' parameter ("20090201t20z") to DateTime::Span::from_datetimes
was a 'scalar', which is not one of the allowed types: object
 at C:/strawberry/perl/site/lib/DateTime/Span.pm line 37
DateTime::Span::from_datetimes(undef, 'start', '20090201t20z')
called at C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 515
DateTime::Event::ICal::recur('DateTime::Event::ICal', 'freq', 'monthly',
'byday', 'ARRAY(0x11f805c)', 'dtstart', '20090201t20z') called at
C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 501
DateTime::Event::ICal::recur('DateTime::Event::ICal', 'count', 12,
'freq', 'monthly', 'byday', 'ARRAY(0x11f805c)', 'dtstart',
'20090201t20z', ...) called at
C:/strawberry/perl/site/lib/DateTime/Format/ICal.pm line 173
DateTime::Format::ICal::parse_recurrence(undef, 'recurrence',
'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T20Z;COUNT=12', 'dtstart',
'DateTime=HASH(0x11f772c)') called at C:/Documents and
Settings/omengue/Documents/Eclipse/Test POE Scheduler/test-ical-recur.pl
line 31


It looks like a conversion of the string value of dtstart to a DateTime
object is missing...

Olivier
http://o.mengue.free.fr/