[Jifty-commit] r2640 - jifty/trunk/lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jan 27 01:48:24 EST 2007
Author: audreyt
Date: Sat Jan 27 01:48:24 2007
New Revision: 2640
Modified:
jifty/trunk/lib/Jifty/Web/Form/Clickable.pm
Log:
* Clickable - Stylistic cleanup to _map to avoid $_ and in-situ hash key editing
Modified: jifty/trunk/lib/Jifty/Web/Form/Clickable.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Clickable.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Clickable.pm Sat Jan 27 01:48:24 2007
@@ -313,13 +313,15 @@
# Query-map any complex structures
sub _map {
- my %args = @_;
- for (keys %args) {
- my ($key, $value) = Jifty::Request::Mapper->query_parameters($_ => $args{$_});
- delete $args{$_};
- $args{$key} = $value;
+ my %old_args = @_;
+ my %new_args;
+
+ while (my ($key, $val) = each %old_args) {
+ my ($new_key, $new_val) = Jifty::Request::Mapper->query_parameters($key => $val);
+ $new_args{$new_key} = $new_val;
}
- return %args;
+
+ return %new_args;
}
=head2 parameters
More information about the Jifty-commit
mailing list