From: Daniel Westermann-Clark Date: Tue, 22 Aug 2006 05:05:58 +0000 (+0000) Subject: use ref instead of eval to check limit syntax (to avoid issues with Devel::StackTrace) X-Git-Tag: v0.07002~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e4cc825789dfcda75550cd800c870d9bae6ab06f;p=dbsrgits%2FDBIx-Class.git use ref instead of eval to check limit syntax (to avoid issues with Devel::StackTrace) --- diff --git a/Changes b/Changes index beee9bd..d0389c1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for DBIx::Class + - use ref instead of eval to check limit syntax (to avoid issues with + Devel::StackTrace) - remove_columns now deletes columns from _columns 0.07001 2006-08-18 19:55:00 diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 6cfc4b8..eb15d8a 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -54,7 +54,7 @@ WHERE ROW_NUM BETWEEN $offset AND $last # without digging into things too deeply sub _find_syntax { my ($self, $syntax) = @_; - my $dbhname = eval { $syntax->{Driver}->{Name}} || ''; + my $dbhname = ref $syntax eq 'HASH' ? $syntax->{Driver}{Name} : ''; if(ref($self) && $dbhname && $dbhname eq 'DB2') { return 'RowNumberOver'; }