From: Rafael Kitover Date: Tue, 30 Mar 2010 23:32:07 +0000 (-0400) Subject: add firebird warning for unquoted_ddl option X-Git-Tag: 0.06000~14^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec957051ac1db23ae1de63e3783833883e47d27c;p=dbsrgits%2FDBIx-Class-Schema-Loader.git add firebird warning for unquoted_ddl option --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index f200ef3..bcd9ad2 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -58,6 +58,16 @@ sub _setup { $self->schema->storage->sql_maker->name_sep('.'); + if (not defined $self->unquoted_ddl) { + warn <<'EOF'; + +WARNING: Assuming mixed-case Firebird DDL, see the unquoted_ddl option in +perldoc DBIx::Class::Schema::Loader::DBI::InterBase +for more information. + +EOF + } + if (not $self->unquoted_ddl) { $self->schema->storage->sql_maker->quote_char('"'); } diff --git a/t/18firebird_common.t b/t/18firebird_common.t index 295bec3..9d71c1c 100644 --- a/t/18firebird_common.t +++ b/t/18firebird_common.t @@ -55,7 +55,7 @@ my $tester = dbixcsl_common_tests->new( } : ()), ], extra => { - count => 6, + count => 7, run => sub { $schema = shift; @@ -87,8 +87,16 @@ q{ my $guard = Scope::Guard->new(\&cleanup_extra); - $schema->_loader->{unquoted_ddl} = 0; - $schema->_loader->_setup; + delete $schema->_loader->{unquoted_ddl}; + + my $warning; + { + local $SIG{__WARN__} = sub { $warning = shift }; + $schema->_loader->_setup; + } + like $warning, qr/unquoted_ddl option/, + 'warning mentions unquoted_ddl option'; + { local $SIG{__WARN__} = sub {}; $schema->rescan;