[prev] [thread] [next] [lurker] [Date index for 2002/09/10]
Update of /cvsroot/siesta/siesta/lib/Siesta In directory usw-pr-cvs1:/tmp/cvs-serv32758/lib/Siesta Modified Files: List.pm User.pm Log Message: have ->new_from_hash take a hash not a hashref Index: List.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/List.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- List.pm 10 Sep 2002 18:23:28 -0000 1.34 +++ List.pm 10 Sep 2002 19:08:12 -0000 1.35 @@ -33,7 +33,7 @@ return bless \%list, $class; } -=head2 ->new_from_hash +=head2 ->new_from_hash( %hash ) takes a hash (possible keys are the values of @Siesta::List::fields) and creates a new object. @@ -42,9 +42,9 @@ sub new_from_hash { my $class = shift; - my $hash = shift; + my %hash = @_; - bless $hash, $class; + bless \%hash, $class; } =head2 ->id Index: User.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/User.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- User.pm 10 Sep 2002 18:23:46 -0000 1.15 +++ User.pm 10 Sep 2002 19:08:14 -0000 1.16 @@ -43,9 +43,9 @@ sub new_from_hash { my $class = shift; - my $hash = shift; + my %hash = @_; - return bless $hash, $class; + return bless \%hash, $class; } =head2 ->id @@ -54,7 +54,7 @@ =head2 ->forename -get and set their forename +get and set their forename =head2 ->surname
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52