X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FSQLite.pm;h=b7532643c2c0572ed7201309f6da42f0a1907864;hb=refs%2Ftags%2F0.05003;hp=3bc4522ac6bc9e2dd501e240e0261650b80570f3;hpb=c3fb509f26163ea4760053474e0ebb03f6fc98c4;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm index 3bc4522..b753264 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm @@ -2,12 +2,15 @@ package DBIx::Class::Schema::Loader::DBI::SQLite; use strict; use warnings; -use base qw/DBIx::Class::Schema::Loader::DBI/; +use base qw/ + DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault + DBIx::Class::Schema::Loader::DBI +/; use Carp::Clan qw/^DBIx::Class/; use Text::Balanced qw( extract_bracketed ); use Class::C3; -our $VERSION = '0.04999_09'; +our $VERSION = '0.05003'; =head1 NAME @@ -63,7 +66,7 @@ sub _sqlite_parse_table { $sth->finish; # Cut "CREATE TABLE ( )" blabla... - $sql =~ /^[\w\s']+\((.*)\)$/si; + $sql =~ /^[\w\s"]+\((.*)\)$/si; my $cols = $1; # strip single-line comments @@ -116,7 +119,7 @@ sub _sqlite_parse_table { $auto_inc{lc $1} = 1; } - next if $col !~ /^(.*\S)\s+REFERENCES\s+(\w+) (?: \s* \( (.*) \) )? /ix; + next if $col !~ /^(.*\S)\s+REFERENCES\s+(\w+) (?: \s* \( (.*) \) )? /six; my ($cols, $f_table, $f_cols) = ($1, $2, $3); @@ -125,7 +128,7 @@ sub _sqlite_parse_table { $cols =~ s/\s*\)$//; } else { # Inline - $cols =~ s/\s+.*$//; + $cols =~ s/\s+.*$//s; } my @cols = map { s/\s*//g; lc $_ } split(/\s*,\s*/,$cols); @@ -200,6 +203,15 @@ sub _tables_list { L, L, L +=head1 AUTHOR + +See L and L. + +=head1 LICENSE + +This library is free software; you can redistribute it and/or modify it under +the same terms as Perl itself. + =cut 1;