fuckheaded failure to check defined before regexing
Matt S Trout [Fri, 16 Jun 2006 21:54:53 +0000 (21:54 +0000)]
lib/DBIx/Class/InflateColumn/DateTime.pm

index f5feb95..969e50e 100644 (file)
@@ -48,7 +48,7 @@ directly called by end users.
 sub register_column {
   my ($self, $column, $info, @rest) = @_;
   $self->next::method($column, $info, @rest);
-  if ($info->{data_type} =~ /^datetime$/i) {
+  if (defined($info->{data_type}) && $info->{data_type} =~ /^datetime$/i) {
     $self->inflate_column(
       $column =>
         {