[Bast-commits] r3300 - in branches/DBIx-Class-current:
lib/DBIx/Class lib/DBIx/Class/Storage t/lib
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Fri May 11 04:54:28 GMT 2007
Author: matthewt
Date: 2007-05-11 04:54:27 +0100 (Fri, 11 May 2007)
New Revision: 3300
Modified:
branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm
branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm
branches/DBIx-Class-current/t/lib/DBICTest.pm
Log:
eliminate the last of the AutoCommit warnings
Modified: branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm 2007-05-11 03:44:20 UTC (rev 3299)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm 2007-05-11 03:54:27 UTC (rev 3300)
@@ -503,7 +503,8 @@
sub compose_connection {
my ($self, $target, @info) = @_;
- warn "compose_connection deprecated as of 0.08000" unless $warn++;
+ warn "compose_connection deprecated as of 0.08000"
+ unless ($INC{"DBIx/Class/CDBICompat.pm"} || $warn++);
my $base = 'DBIx::Class::ResultSetProxy';
eval "require ${base};";
Modified: branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm 2007-05-11 03:44:20 UTC (rev 3299)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm 2007-05-11 03:54:27 UTC (rev 3300)
@@ -486,7 +486,6 @@
# but not in the coderef case, obviously.
if(ref $info->[0] ne 'CODE') {
$last_info = $info->[3];
-
warn "You *really* should explicitly set AutoCommit "
. "(preferably to 1) in your db connect info"
if !$last_info
Modified: branches/DBIx-Class-current/t/lib/DBICTest.pm
===================================================================
--- branches/DBIx-Class-current/t/lib/DBICTest.pm 2007-05-11 03:44:20 UTC (rev 3299)
+++ branches/DBIx-Class-current/t/lib/DBICTest.pm 2007-05-11 03:54:27 UTC (rev 3300)
@@ -55,12 +55,18 @@
my $dbuser = $ENV{"DBICTEST_DBUSER"} || '';
my $dbpass = $ENV{"DBICTEST_DBPASS"} || '';
- my $compose_method = ($args{compose_connection}
- ? 'compose_connection'
- : 'compose_namespace');
+ my $schema;
- my $schema = DBICTest::Schema->$compose_method('DBICTest')
- ->connect($dsn, $dbuser, $dbpass, { AutoCommit => 1 });
+ my @connect_info = ($dsn, $dbuser, $dbpass, { AutoCommit => 1 });
+
+ if ($args{compose_connection}) {
+ $schema = DBICTest::Schema->compose_connection(
+ 'DBICTest', @connect_info
+ );
+ } else {
+ $schema = DBICTest::Schema->compose_namespace('DBICTest')
+ ->connect(@connect_info);
+ }
$schema->storage->on_connect_do(['PRAGMA synchronous = OFF']);
if ( !$args{no_deploy} ) {
__PACKAGE__->deploy_schema( $schema );
More information about the Bast-commits
mailing list