use ref instead of eval to check limit syntax (to avoid issues with Devel::StackTrace)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index 6cfc4b8..eb15d8a 100644 (file)
@@ -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';
   }