cvs commit: p5ee/App-Repository/lib/App/Repository DBI.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     05/01/20 10:00:59

  Modified:    App-Repository/lib/App/Repository DBI.pm
  Log:
  die on empty query
  
  Revision  Changes    Path
  1.22      +3 -2      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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DBI.pm	14 Dec 2004 15:42:14 -0000	1.21
  +++ DBI.pm	20 Jan 2005 18:00:59 -0000	1.22
  @@ -1,13 +1,13 @@
   
   ######################################################################
  -## File: $Id: DBI.pm,v 1.21 2004/12/14 15:42:14 spadkins Exp $
  +## File: $Id: DBI.pm,v 1.22 2005/01/20 18:00:59 spadkins Exp $
   ######################################################################
   
   use App;
   use App::Repository;
   
   package App::Repository::DBI;
  -$VERSION = do { my @r=(q$Revision: 1.21 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
  +$VERSION = do { my @r=(q$Revision: 1.22 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
   
   @ISA = ( "App::Repository" );
   
  @@ -399,6 +399,7 @@
           $sql = $self->_mk_select_joined_sql($table, $params, $cols, $options);
       }
       $self->{sql} = $sql;
  +    die "empty SQL query for table [$table] (does table exist?)" if (!$sql);
   
       $self->_connect() if (!$self->{dbh});
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.