cvsuser     05/12/09 14:16:35

  Modified:    App-Repository/lib/App/Repository DBI.pm
  Log:
  enhanced debug_sql output on _do()
  
  Revision  Changes    Path
  1.34      +17 -3     p5ee/App-Repository/lib/App/Repository/DBI.pm
  
  Index: DBI.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository/DBI.pm,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- DBI.pm    25 Nov 2005 16:35:03 -0000      1.33
  +++ DBI.pm    9 Dec 2005 22:16:32 -0000       1.34
  @@ -2119,7 +2119,21 @@
           }
       }
       if ($debug_sql) {
  -        print "DEBUG_SQL: retval [$retval] $DBI::errstr\n";
  +        my $nrows = 0;
  +        if ($retval) {
  +            if (ref($retval)) {
  +                $nrows = $#$retval + 1;
  +            }
  +            else {
  +                $nrows = $retval;
  +            }
  +        }
  +        print "DEBUG_SQL: nrows [$nrows] $DBI::errstr\n";
  +        if ($debug_sql >= 2 && ref($retval)) {
  +            foreach my $row (@$retval) {
  +                print "DEBUG_SQL: [", join("|",map { defined $_ ? $_ : 
"undef"} @$row), "]\n";
  +            }
  +        }
           print "\n";
       }
   
  
  
  

Reply via email to