prep release
[dbsrgits/DBIx-Class-DateTime-Epoch.git] / lib / DBIx / Class / DateTime / Epoch.pm
index a719233..2da8a2b 100644 (file)
@@ -3,7 +3,7 @@ package DBIx::Class::DateTime::Epoch;
 use strict;
 use warnings;
 
-our $VERSION = '0.05';
+our $VERSION = '0.08';
 
 use base qw( DBIx::Class );
 
@@ -38,16 +38,16 @@ sub add_columns {
 
 sub _inflate_to_datetime {
     my( $self, $value, $info, @rest ) = @_;
-    $self->next::method( $value, $info, @rest )
-        unless $info->{ data_type } =~ m{int} || $info->{ inflate_datetime } eq 'epoch';
+    return $self->next::method( $value, $info, @rest )
+        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 ) = @_;
-    $self->next::method( $value, $info, @rest )
-        unless $info->{ data_type } =~ m{int} || $info->{ inflate_datetime } eq 'epoch';
+    return $self->next::method( $value, $info, @rest )
+        unless $info->{ data_type } =~ m{int}i || (exists $info->{ inflate_datetime } && $info->{ inflate_datetime } eq 'epoch');
 
     return $value->epoch;
 }
@@ -134,11 +134,11 @@ Overrides column deflation to call C<epoch()> on the column value.
 
 =over 4
 
-=item * DBIx::Class
+=item * L<DBIx::Class>
 
-=item * DBIx::Class::TimeStamp
+=item * L<DBIx::Class::TimeStamp>
 
-=item * DateTime
+=item * L<DateTime>
 
 =back
 
@@ -150,7 +150,7 @@ Adam Paynter E<lt>adapay@cpan.orgE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2011 by Brian Cassidy
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.