[Dbix-class] InflateColumn::DateTime - how to use it?

Jason Kohles email at jasonkohles.com
Wed May 23 20:36:10 GMT 2007


On May 17, 2007, at 8:21 AM, Jess Robinson wrote:

>
> On Wed, 16 May 2007, Pedro Melo wrote:
>
>> Hello,
>>
>> Core should be after IC::DT.
>>
>> I just noticed that the SYNOPSIS is wrong in http:// 
>> search.cpan.org/~blblack/DBIx-Class-0.07006/lib/DBIx/Class/ 
>> InflateColumn/DateTime.pm
>>
>> Patch attached to fix it.
>
>
> Thanks, applied.
>

Is the mailing list the appropriate way to get  
InflateColumn::DateTime patched?  I put this simple little patch in  
RT a while ago but it never seemed to get acted on, and it would be  
nice if I didn't have to keep re-applying it every time I upgrade  :)

Index: DateTime.pm
===================================================================
--- DateTime.pm (revision 3369)
+++ DateTime.pm (working copy)
@@ -54,7 +54,7 @@
    $self->next::method($column, $info, @rest);
    return unless defined($info->{data_type});
    my $type = lc($info->{data_type});
-  $type = 'datetime' if ($type eq 'timestamp');
+  $type = 'datetime' if ($type =~ /timestamp/);
    if ($type eq 'datetime' || $type eq 'date') {
      my ($parse, $format) = ("parse_${type}", "format_${type}");
      $self->inflate_column(


-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Dbix-class mailing list