#!/usr/bin/perl -w use strict; use DateTime; my $now = DateTime->now;

-------------------------------------------------

When I attempt to run the program I get to following:

$ perl perltest.pl 'regex' validation parameter for 'DateTime::from_epoch must be a string or qr// regex at /usr/local/lib64/perl5/DateTime.pm line 486 DateTime::from_epoch(undef, 'epoch', 1301690690) called at /usr/local/lib64/perl5/DateTime.pm line 511 DateTime::now('DateTime') called at perltest.pl line 6

----------------------------------------------------------

I attempted to look at the DateTime.pm file, but I couldn't see the problem in from_epoch().

I have used this module on a different server before with success. On the new server (redhat 6.0) DateTime installed from CPAN without a fuss, but I can't use it.

Please let me know if I have done anything incorrectly, I am a first time poster here and would be grateful for any help as googling this issue has brought information.

This is perl 5, version 12, subversion 3 (v5.12.3) built for x86_64-linux-thread-multi

DateTime is up to date (0.66).

perl -le'use Params::Validate; print Params::Validate->VERSION'

0.95


In reply to DateTime->now problem by Grimey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.