[Bast-commits] r8232 - in DBIx-Class/0.08/trunk:
lib/DBIx/Class/Storage/DBI/Sybase t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sun Jan 3 23:30:52 GMT 2010
Author: caelum
Date: 2010-01-03 23:30:51 +0000 (Sun, 03 Jan 2010)
New Revision: 8232
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
DBIx-Class/0.08/trunk/t/74mssql.t
Log:
fix _rebless into sybase/mssql/nobindvars
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2010-01-03 21:23:37 UTC (rev 8231)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2010-01-03 23:30:51 UTC (rev 8232)
@@ -13,7 +13,11 @@
my $self = shift;
my $dbh = $self->_get_dbh;
+ return if ref $self ne __PACKAGE__;
+
if (not $self->_typeless_placeholders_supported) {
+ require
+ DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars;
bless $self,
'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars';
$self->_rebless;
Modified: DBIx-Class/0.08/trunk/t/74mssql.t
===================================================================
--- DBIx-Class/0.08/trunk/t/74mssql.t 2010-01-03 21:23:37 UTC (rev 8231)
+++ DBIx-Class/0.08/trunk/t/74mssql.t 2010-01-03 23:30:51 UTC (rev 8232)
@@ -31,14 +31,19 @@
$schema = DBICTest::Schema->clone;
+ $schema->connection($dsn, $user, $pass);
+
if ($storage_idx != 0) { # autodetect
- $schema->storage_type("::$storage_type");
+ no warnings 'redefine';
+ local *DBIx::Class::Storage::DBI::_typeless_placeholders_supported =
+ sub { 0 };
+# $schema->storage_type("::$storage_type");
+ $schema->storage->ensure_connected;
}
+ else {
+ $schema->storage->ensure_connected;
+ }
- $schema->connection($dsn, $user, $pass);
-
- $schema->storage->ensure_connected;
-
if ($storage_idx == 0 && ref($schema->storage) =~ /NoBindVars\z/) {
my $tb = Test::More->builder;
$tb->skip('no placeholders') for 1..$NUMBER_OF_TESTS_IN_BLOCK;
More information about the Bast-commits
mailing list