[Jifty-commit] r4336 - in jifty/trunk: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Oct 30 18:22:55 EDT 2007
Author: alexmv
Date: Tue Oct 30 18:22:53 2007
New Revision: 4336
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Param/Schema.pm
Log:
r24221 at zoq-fot-pik: chmrr | 2007-10-30 18:21:04 -0400
* Work around a "feature" in Hash::Merge < 0.10
Modified: jifty/trunk/lib/Jifty/Param/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Param/Schema.pm (original)
+++ jifty/trunk/lib/Jifty/Param/Schema.pm Tue Oct 30 18:22:53 2007
@@ -172,9 +172,17 @@
=cut
sub merge_params {
+ my @merge = @_;
+
+ # We pull this deref and re-ref trick to un-bless any
+ # Jifty::Params which might exist; Hash::Merge pre-0.10 merged
+ # objects and hahrefs with no complaint, but 0.10 doesn't.
+ for my $m (@merge) {
+ $m->{$_} = {%{$m->{$_}}} for keys %{$m};
+ }
my $prev_behaviour = Hash::Merge::get_behavior();
Hash::Merge::specify_behavior( MERGE_PARAM_BEHAVIOUR, "merge_params" );
- my $rv = Hash::Merge::merge(@_);
+ my $rv = Hash::Merge::merge(@merge);
Hash::Merge::set_behavior( $prev_behaviour );
return $rv;
}
More information about the Jifty-commit
mailing list