[Bast-commits] r7354 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Thu Aug 20 21:54:05 GMT 2009
Author: frew
Date: 2009-08-20 21:54:04 +0000 (Thu, 20 Aug 2009)
New Revision: 7354
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm
Log:
add some basic guards to get rid of warnings
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-08-20 17:53:02 UTC (rev 7353)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-08-20 21:54:04 UTC (rev 7354)
@@ -55,10 +55,14 @@
@pk_cols{@pk_cols} = ();
my @pk_guids = grep {
+ $source->column_info($_)->{data_type}
+ &&
$source->column_info($_)->{data_type} =~ /^uniqueidentifier/i
} @pk_cols;
my @auto_guids = grep {
+ $source->column_info($_)->{data_type}
+ &&
$source->column_info($_)->{data_type} =~ /^uniqueidentifier/i
&&
$source->column_info($_)->{auto_nextval}
@@ -87,7 +91,9 @@
for my $col (keys %$fields) {
# $ident is a result source object with INSERT/UPDATE ops
- if ($ident->column_info ($col)->{data_type} =~ /^money\z/i) {
+ if ($ident->column_info ($col)->{data_type}
+ &&
+ $ident->column_info ($col)->{data_type} =~ /^money\z/i) {
my $val = $fields->{$col};
$fields->{$col} = \['CAST(? AS MONEY)', [ $col => $val ]];
}
More information about the Bast-commits
mailing list