[Bast-commits] r6862 - in DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx: . Class Class/Storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Mon Jun 29 23:13:49 GMT 2009


Author: ribasushi
Date: 2009-06-29 23:13:49 +0000 (Mon, 29 Jun 2009)
New Revision: 6862

Modified:
   DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class.pm
   DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/SQLAHacks.pm
   DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Schema.pm
   DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI.pm
Log:
Make sure storage classes use c3, just like the rest of dbic (tested on 5.8 as well)

Modified: DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/SQLAHacks.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/SQLAHacks.pm	2009-06-29 22:37:12 UTC (rev 6861)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/SQLAHacks.pm	2009-06-29 23:13:49 UTC (rev 6862)
@@ -12,12 +12,13 @@
   no warnings qw/redefine/;
   no strict qw/refs/;
   for my $f (qw/carp croak/) {
+
     my $orig = \&{"SQL::Abstract::$f"};
     *{"SQL::Abstract::$f"} = sub {
 
       local $Carp::CarpLevel = 1;   # even though Carp::Clan ignores this, $orig will not
 
-      if (Carp::longmess() =~ /DBIx::Class::SQLAHacks::[\w]+\(\) called/) {
+      if (Carp::longmess() =~ /DBIx::Class::SQLAHacks::[\w]+ .+? called \s at/x) {
         __PACKAGE__->can($f)->(@_);
       }
       else {

Modified: DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Schema.pm	2009-06-29 22:37:12 UTC (rev 6861)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Schema.pm	2009-06-29 23:13:49 UTC (rev 6862)
@@ -7,9 +7,8 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Scalar::Util qw/weaken/;
 use File::Spec;
-use MRO::Compat;
 use Sub::Name ();
-require Module::Find;
+use Module::Find();
 
 use base qw/DBIx::Class/;
 

Modified: DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI.pm	2009-06-29 22:37:12 UTC (rev 6861)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI.pm	2009-06-29 23:13:49 UTC (rev 6862)
@@ -642,8 +642,10 @@
       ($driver) = $self->_dbi_connect_info->[0] =~ /dbi:([^:]+):/i;
     }
 
-    if ($self->load_optional_class("DBIx::Class::Storage::DBI::${driver}")) {
-      bless $self, "DBIx::Class::Storage::DBI::${driver}";
+    my $storage_class = "DBIx::Class::Storage::DBI::${driver}";
+    if ($self->load_optional_class($storage_class)) {
+      mro::set_mro($storage_class, 'c3');
+      bless $self, $storage_class;
       $self->_rebless();
     }
   }

Modified: DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class.pm	2009-06-29 22:37:12 UTC (rev 6861)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class.pm	2009-06-29 23:13:49 UTC (rev 6862)
@@ -3,11 +3,12 @@
 use strict;
 use warnings;
 
+use MRO::Compat;
+
 use vars qw($VERSION);
 use base qw/DBIx::Class::Componentised Class::Accessor::Grouped/;
 use DBIx::Class::StartupCheck;
 
-
 sub mk_classdata {
   shift->mk_classaccessor(@_);
 }




More information about the Bast-commits mailing list