use strict;
use warnings;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
use base qw( DBIx::Class );
sub _inflate_to_datetime {
my( $self, $value, $info, @rest ) = @_;
return $self->next::method( $value, $info, @rest )
- unless $info->{ data_type } =~ m{int}i || $info->{ inflate_datetime } eq 'epoch';
+ unless $info->{ data_type } =~ m{int}i || (exists $info->{ inflate_datetime } && $info->{ inflate_datetime } eq 'epoch');
return DateTime->from_epoch( epoch => $value );
}
sub _deflate_from_datetime {
my( $self, $value, $info, @rest ) = @_;
return $self->next::method( $value, $info, @rest )
- unless $info->{ data_type } =~ m{int}i || $info->{ inflate_datetime } eq 'epoch';
+ unless $info->{ data_type } =~ m{int}i || (exists $info->{ inflate_datetime } && $info->{ inflate_datetime } eq 'epoch');
return $value->epoch;
}