|
Posted by Sisyphus on August 3, 2007, 8:34 am
Please log in for more thread options
.
.
> #!/usr/bin/perl -w
>
> use strict;
>
> use DateTime;
> use DateTime::Format::MySQL;
>
> my $str = "2007-08-03";
>
> my $mySQLdate = DateTime::Format::MySQL->new;
> my $parsed = DateTime::Format::MySQL->format_date($mySQLdate);
>
> The error message I get is:
>
> Can't locate object method "ymd" via package "DateTime::Format::MySQL"
> at /usr/lib/perl5/site_perl/5.8.8/DateTime/Format/MySQL.pm line 84.
>
> Does anybody knows why I get this error message?
>
format_date() calls the ymd method, which appears to be defined in
DateTime.pm. Perhaps you have an old outdated version of DateTime - one that
doesn't define the ymd method ?
Didn't you get the same error when running 'make test' ? The test file
t/01format.t calls format_date(), and should therefore have produced the
same failure.
Cheers,
Rob
|