cvsuser     05/01/31 12:50:16

  Modified:    App-Repository/lib/App Repository.pm
  Log:
  set() can now take a hashref for values
  
  Revision  Changes    Path
  1.19      +7 -1      p5ee/App-Repository/lib/App/Repository.pm
  
  Index: Repository.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository.pm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Repository.pm     7 Jan 2005 13:36:56 -0000       1.18
  +++ Repository.pm     31 Jan 2005 20:50:16 -0000      1.19
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Repository.pm,v 1.18 2005/01/07 13:36:56 spadkins Exp $
  +## $Id: Repository.pm,v 1.19 2005/01/31 20:50:16 spadkins Exp $
   #############################################################################
   
   package App::Repository;
  @@ -609,11 +609,13 @@
   
       * Signature: $nrows = $rep->set_row($table, $key,    $cols, $row, 
$options);
       * Signature: $nrows = $rep->set_row($table, $params, $cols, $row, 
$options);
  +    * Signature: $nrows = $rep->set_row($table, $params, $cols, $rowhash, 
$options);
       * Signature: $nrows = $rep->set_row($table, $hash,   undef, 
undef,$options);
       * Signature: $nrows = $rep->set_row($table, $params, $hash, 
undef,$options);
       * Param:     $table     string
       * Param:     $cols      ARRAY
       * Param:     $row       ARRAY
  +    * Param:     $rowhash   HASH
       * Param:     $key       string
       * Param:     $hash      HASH
       * Param:     $params    undef,HASH
  @@ -639,6 +641,10 @@
   
       my ($nrows, $key_defined);
       if ($row) {
  +        my $ref = ref($row);
  +        if ($ref && $ref ne "ARRAY") {
  +            $row = [ @[EMAIL PROTECTED] ];
  +        }
           $nrows = $self->_set_row($table, $params, $cols, $row, $options);
       }
       else {
  
  
  

Reply via email to