Skip Menu |

This queue is for tickets about the Log-Dispatch-FileRotate CPAN distribution.

Report information
The Basics
Id: 35729
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Log-Dispatch-FileRotate

People
Owner: cpan [...] mlp-consulting.com.au
Requestors: mschout [...] gkg.net
Cc:
AdminCc:

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



Subject: Log::Dispatch::FileRotate can't work with Date::Manip 5.50
Date: Thu, 08 May 2008 12:21:45 -0500
To: bug-Log-Dispatch-FileRotate [...] rt.cpan.org
From: Michael Schout <mschout [...] gkg.net>
Date::Manip 5.50 renamed Date_Split() to _Date_Split(), apparently indicating you should not use it outside Date::Manip. Log::Dispatch::FileRotate calls Date_Split() inside _gen_occurance(), but this fails because Date_Split() does not exist anymore. I didn't see any mention of the reason for this change in the HISTORY file from Date::Manip.
I'm the author of Date::Manip and this "bug" was reported to me as well. Date_Split was not included in the export list, was not documented, and was never intended for public use. It is strictly an internal function which can (and will) change without notice. Date::Manip is undergoing a significant rewrite/reorg in order to improve it. One of the things I wanted to do is make it comply with Pod::Coverage tests which ensure that it is completely documented, and that required that internal only routines start with an underscore (to be completely accurate, there were other possibilities, but that option was the most useful IMO). The call to Date_Split should be replaced with a call to UnixDate which IS the way to exctract information from a date. The following two lines are equivalent: @tmp = Date_Split($date) @tmp = UnixDate($date,"%Y","%m","%d","%H","%M","%S") (except of course that the first one no longer works). Please update the module accordingly. And, as a suggestion, when you are looking at other modules, and actually reading the source code (a wonderful practice), don't use functions in that module from the section labeled: NOT FOR EXPORT :-)
Log-Dispatch-FileRotate-1.17.tar.gz has just been uploaded to PAUSE. This contains the fix pointed out. It tests OK for me. Please let me know if you are still having troubles. -- cheers markpf
Log-Dispatch-FileRotate-1.17.tar.gz has just been uploaded to PAUSE. This contains the fix pointed out. It tests OK for me. Please let me know if you are still having troubles. -- cheers markpf