[Jifty-commit] r5870 - in Jifty-DBI/trunk: lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Fri Sep 19 19:00:49 EDT 2008
Author: ruz
Date: Fri Sep 19 19:00:48 2008
New Revision: 5870
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
Log:
r5889 at cubic-pc: cubic | 2008-09-19 04:54:23 +0400
* grep before looping
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm Fri Sep 19 19:00:48 2008
@@ -1158,12 +1158,9 @@
$self->{'values'} = {};
$self->{'fetched'} = {};
- #foreach my $f ( keys %$hashref ) { $self->{'fetched'}{ $f } = 1; }
- foreach my $col ( map { $_->name } $self->columns ) {
- next unless exists $hashref->{ lc($col) };
+ foreach my $col ( grep exists $hashref->{ lc $_ }, map $_->name, $self->columns ) {
$self->{'fetched'}{$col} = 1;
- $self->{'values'}->{$col} = $hashref->{ lc($col) };
-
+ $self->{'values'}{$col} = $hashref->{ lc $col };
}
#$self->{'values'} = $hashref;
More information about the Jifty-commit
mailing list