jonadab has asked for the wisdom of the Perl Monks concerning the following question:
I've searched CPAN, but everything I can find (e.g., DateTime::Format::DBI) goes the other way, creating a datetime string from a DateTime object. I need to do the reverse, creating a DateTime object from a datetime string that comes from a MySQL database.
Of course, I could parse the datetime string and feed the individual bits to DateTime::new(), but shouldn't the various DateTime modules on CPAN provide a function to do this? I mean, I could write this easily enough, but it just astounds me that it isn't already there. Where did I miss it?
Alternately, if it's not there, how do I go about writing one and submitting it? I've not written a module as yet, much less anything worthy of CPAN... I'm willing to learn, and I have read the chapter in on h2xs in Effective Perl Programming, but I don't have that book here, and... my memory is imperfect, and... this seems like something useful enough to include in the existing DateTime::Format::DBI modules, and in short I don't really know where to begin. I can put together the function itself easily enough, but the rest of the details are daunting me.
|
|---|