Herkum has asked for the wisdom of the Perl Monks concerning the following question:
I keep getting this error only on my scripts running on Apache
Use of uninitialized value in negation (-) at /usr/local/perl5.10/lib/ +site_perl/5.10.0/i686-linux/DateTime.pm line 1651.
I have seen mentions of this type of error but no answer on what it is specifically supposed to cause this. Is this an XS error or something else?
Update: I did find the answer to my problem. While you can sort of get away with using cmp to compare dates, it will return an error because it is expecting a package name to be passed. What I should have been using was DateTime->compare( $dt1, $dt2 ) to compare the dates. The silences the error as well as sorts by date.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Negation Error
by broomduster (Priest) on Sep 21, 2008 at 00:19 UTC | |
by Herkum (Parson) on Sep 21, 2008 at 01:13 UTC | |
by ikegami (Patriarch) on Sep 21, 2008 at 01:35 UTC | |
by Herkum (Parson) on Sep 21, 2008 at 16:50 UTC | |
Re: Negation Error
by GrandFather (Saint) on Sep 20, 2008 at 22:40 UTC |