From: woosley Date: Mon, 17 Jan 2011 09:56:25 +0000 (+0800) Subject: add return X-Git-Tag: 0.07~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6130f0837779a086c201ede38b34240403ab66ce;p=dbsrgits%2FDBIx-Class-DateTime-Epoch.git add return --- 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;