X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDateTime%2FEpoch.pm;h=992a953cd2b344fd7a90aec2e9669e68c65f8f07;hb=6130f0837779a086c201ede38b34240403ab66ce;hp=ee14d26fee417b3d68ae0c002fc750d3ffe76c3c;hpb=6c484ccf808f1aa99bb513c0fff0bd5ced694445;p=dbsrgits%2FDBIx-Class-DateTime-Epoch.git diff --git a/lib/DBIx/Class/DateTime/Epoch.pm b/lib/DBIx/Class/DateTime/Epoch.pm index ee14d26..992a953 100644 --- a/lib/DBIx/Class/DateTime/Epoch.pm +++ b/lib/DBIx/Class/DateTime/Epoch.pm @@ -38,7 +38,7 @@ sub add_columns { sub _inflate_to_datetime { my( $self, $value, $info, @rest ) = @_; - $self->next::method( $value, $info, @rest ) + return $self->next::method( $value, $info, @rest ) unless $info->{ data_type } =~ m{int}i || $info->{ inflate_datetime } eq 'epoch'; return DateTime->from_epoch( epoch => $value ); @@ -46,7 +46,7 @@ sub _inflate_to_datetime { sub _deflate_from_datetime { my( $self, $value, $info, @rest ) = @_; - $self->next::method( $value, $info, @rest ) + return $self->next::method( $value, $info, @rest ) unless $info->{ data_type } =~ m{int}i || $info->{ inflate_datetime } eq 'epoch'; return $value->epoch;