Fix SQLite _extra_column_info for new DBD::SQLite which ->can('column_info')
Dagfinn Ilmari Mannsåker [Tue, 7 Apr 2009 23:53:22 +0000 (23:53 +0000)]
Changes
lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm

diff --git a/Changes b/Changes
index 3961b8e..b8cdf0d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader
 0.04999_07 Not Yet Released
         - Add result_base_class and schema_base_class options (RT #43977)
         - Ignore duplicate uniq indices (including duplicates of the PK).
+        - Fix for DBD::SQLite 1.20
 
 0.04999_06 Tue Nov 11, 2008
         - Singularise table monikers by default
index 03a7134..8f1fd03 100644 (file)
@@ -148,6 +148,7 @@ sub _sqlite_parse_table {
 
 sub _extra_column_info {
     my ($self, $table, $col_name, $sth, $col_num) = @_;
+    ($table, $col_name) = @{$table}{qw/TABLE_NAME COLUMN_NAME/} if ref $table;
     my %extra_info;
 
     $self->{_sqlite_parse_data}->{$table} ||=