[siesta-commit] siesta/lib/Siesta/Storage DBI.pm,1.19,1.20

[prev] [thread] [next] [lurker] [Date index for 2002/09/10]

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta/Storage DBI.pm,1.19,1.20
Date: 20:08 on 10 Sep 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Storage
In directory usw-pr-cvs1:/tmp/cvs-serv32758/lib/Siesta/Storage

Modified Files:
	DBI.pm 
Log Message:
have ->new_from_hash take a hash not a hashref

Index: DBI.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Storage/DBI.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- DBI.pm	10 Sep 2002 18:24:30 -0000	1.19
+++ DBI.pm	10 Sep 2002 19:08:15 -0000	1.20
@@ -39,7 +39,7 @@
 sub get_lists {
     my $self = shift;
 
-    return map { Siesta::List->new_from_hash($_) } $self->_get_rows(
+    return map { Siesta::List->new_from_hash(%$_) } $self->_get_rows(
                                                table   => 'lists',
                                                columns => \@Siesta::List::fields
                                                );
@@ -48,7 +48,7 @@
 sub get_users {
     my $self = shift;
 
-    return map { Siesta::User->new_from_hash($_) } $self->_get_rows(
+    return map { Siesta::User->new_from_hash(%$_) } $self->_get_rows(
                                                table   => 'users',
                                                columns => \@Siesta::User::fields
                                                );
@@ -246,7 +246,7 @@
                                     columns => \@fields
                                     );
 
-    return map { Siesta::User->new_from_hash($_) } @results;
+    return map { Siesta::User->new_from_hash(%$_) } @results;
 }
 
 sub list_plugins {
@@ -437,7 +437,7 @@
         $list = Siesta->storage->load_list($list) || return undef;
     }
 
-    # get rid of the exisiting list.	
+    # get rid of the exisiting list.    
     my $sql = sprintf "DELETE from list_plugins where list_id=%s",
       $self->_dbh->quote( $list->id() );
 
@@ -447,8 +447,8 @@
     my $a = 1;
     foreach my $plugin (@plugins) {
         my $isql = sprintf "INSERT INTO list_plugins 
-				    ( id, plugin_id , list_id )
-        		 	    VALUES (%d, %s, %s )", $a++, $self->_dbh->quote($plugin),
+                                    ( id, plugin_id , list_id )
+                                    VALUES (%d, %s, %s )", $a++, $self->_dbh->quote($plugin),
           $self->_dbh->quote( $list->id() );
 
         $self->_dbh->do($isql)




Generated at 13:57 on 01 Jul 2004 by mariachi 0.52