[Bast-commits] r6607 -
DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Wed Jun 10 18:05:54 GMT 2009
Author: frew
Date: 2009-06-10 18:05:53 +0000 (Wed, 10 Jun 2009)
New Revision: 6607
Modified:
DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI/ODBC.pm
Log:
don't use eval!
Modified: DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI/ODBC.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI/ODBC.pm 2009-06-10 17:57:04 UTC (rev 6606)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/lib/DBIx/Class/Storage/DBI/ODBC.pm 2009-06-10 18:05:53 UTC (rev 6607)
@@ -11,9 +11,11 @@
unless ( $@ ) {
# Translate the backend name into a perl identifier
$dbtype =~ s/\W/_/gi;
- my $class = "DBIx::Class::Storage::DBI::ODBC::${dbtype}";
- eval "require $class";
- bless $self, $class unless $@;
+ my $subclass = "DBIx::Class::Storage::DBI::ODBC::${dbtype}";
+ if ($self->load_optional_class($subclass) && !$self->isa($subclass)) {
+ bless $self, $subclass;
+ $self->_rebless;
+ }
}
}
More information about the Bast-commits
mailing list