f960906
From b8cd9d0d853fdca08488f261d5856801e2ce2771 Mon Sep 17 00:00:00 2001
f960906
From: Niko Tyni <ntyni@debian.org>
f960906
Date: Mon, 21 Jan 2019 21:07:59 +0200
f960906
Subject: [PATCH] Fix compatibility with DBD-SQLite >=  1.61_02
f960906
f960906
type_info() now returns an array of mostly undefined values, breaking
f960906
the t/1.t tests. Add a guard for definedness so we still take the other
f960906
branch in this case.
f960906
f960906
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=128135
f960906
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919006
f960906
---
f960906
 Type.pm | 2 +-
f960906
 1 file changed, 1 insertion(+), 1 deletion(-)
f960906
f960906
diff --git a/Type.pm b/Type.pm
f960906
index 688ca35..986fecd 100644
f960906
--- a/Type.pm
f960906
+++ b/Type.pm
f960906
@@ -29,7 +29,7 @@ sub import {
f960906
             @hash{@{$sth->{NAME}}} = 
f960906
             map { 
f960906
                     my $info = scalar $self->db_Main->type_info($_);
f960906
-                    if ($info) { $info->{TYPE_NAME} } 
f960906
+                    if ($info and defined $info->{TYPE_NAME}) { $info->{TYPE_NAME} }
f960906
                     else { $_ } # Typeless databases (SQLite)
f960906
                 }
f960906
                 @{$sth->{TYPE}};
f960906
-- 
f960906
2.20.1
f960906