Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 90344
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: tangentsoft [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 6.41
Fixed in: (no value)



Subject: Events_List in DM6 complains if date isn't in an event
If you pass Events_List() a date that isn't covered by one of the events in the config file, it complains: WARNING: [cmp] Arguments must be valid dates: date2 Use of uninitialized value in integer ne (!=) at /Library/Perl/5.12/Date/Manip/Date.pm line 4550. Can't call method "cmp" on an undefined value at /Library/Perl/5.12/Date/Manip/Date.pm line 4563. Run the attached test script against the attached DateManip.cnf to see the problem. Change the hardcoded date string in the test script to 'Dec 30' to see that the warning goes away. This problem does not happen in DM5 under Perl 5.8.8. (This is why I'm still using the non-OO interface, by the way.)
Subject: DateManip.cnf
Download DateManip.cnf
application/octet-stream 50b

Message body not shown because it is not plain text.

Subject: test
Download test
application/octet-stream 159b

Message body not shown because it is not plain text.

From: OP
By the way, you can also make the message go away by adding: Jan 1 ; Dec 31 = everything to the DateManip.cnf file, but that creates a special case that my program has to handle which isn't as elegant as checking for an empty return from Event_List().
This is now fixed and will be in the next release (which is due out the beginning of December). If you need a version earlier, you can contact me, or you can just add the line: return () if (! @tmp2); at line 4558 in Date.pm (just before sorting @tmp2).