Subject: | This is going to make upgrading difficult! |
Date: | Fri, 16 Jan 2015 11:33:06 +0000 |
To: | bug-Date-Manip [...] rt.cpan.org |
From: | Duncan Garland <duncan.garland [...] motortrak.com> |
Hi,
You appear to have reversed the order of the arguments to DateCalc at some
point. I assume there's something buried in the change logs.
Would it be possible to put a note in a more prominent position.
Sample script:
motrak@mydash-qa:~ $ cat tmp.pl
use strict;
use warnings;
use DateTime;
use Date::Manip;
use Data::Dumper;
my $today = DateTime->today;
my $err;
my ( $years, $months, undef, undef, undef, undef, undef ) = split( ':',
DateCalc( ParseDate($today.""), "01 Feb 2014", \$err, 1 ));
print Dumper ( $years, $months, undef, undef, undef, undef, undef );
You have new mail in /var/mail/motrak
motrak@mydash-qa:~ $
With an old version of Date::Manip:
motrak@mydash-qa:~ $ perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux-gnu-thread-multi
(with 56 registered patches, see perl -V for more detail)
Copyright 1987-2011, Larry Wall
Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
motrak@mydash-qa:~ $ perl -M"Date::Manip 999999" -e 1
Date::Manip version 999999 required--this is only version 6.25.
BEGIN failed--compilation aborted.
motrak@mydash-qa:~ $
motrak@mydash-qa:~ $ perl tmp.pl
$VAR1 = '-0';
$VAR2 = '11';
$VAR3 = undef;
$VAR4 = undef;
$VAR5 = undef;
$VAR6 = undef;
$VAR7 = undef;
motrak@mydash-qa:~ $
With a newer version of Date::Manip:
motrak@upde-duncang:~$ perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux-gnu-thread-multi
(with 56 registered patches, see perl -V for more detail)
Copyright 1987-2011, Larry Wall
Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
motrak@upde-duncang:~$ perl -M"Date::Manip 999999" -e 1
Date::Manip version 999999 required--this is only version 6.47.
BEGIN failed--compilation aborted.
motrak@upde-duncang:~$
motrak@upde-duncang:~$ perl tmp.pl
$VAR1 = '0';
$VAR2 = '-11';
$VAR3 = undef;
$VAR4 = undef;
$VAR5 = undef;
$VAR6 = undef;
$VAR7 = undef;
motrak@upde-duncang:~$
Regards
Duncan
--
The information contained in this message is for the intended addressee
only and may contain confidential and/or privileged information. If you are
not the intended addressee, please delete this message and notify the
sender; do not copy or distribute this message or disclose its contents to
anyone. Any views or opinions expressed in this message are those of the
author and do not necessarily represent those of Motortrak Limited or of
any of its associated companies. No reliance may be placed on this message
without written confirmation from an authorised representative of the
company.
Registered in England 3098391 V.A.T. Registered No. 667463890