[system] / trunk / pg / lib / Value / Context / Data.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/Context/Data.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2658 Revision 2771
156# 156#
157sub set { 157sub set {
158 my $self = shift; my %D = (@_); 158 my $self = shift; my %D = (@_);
159 my $data = $self->{context}{$self->{dataName}}; 159 my $data = $self->{context}{$self->{dataName}};
160 foreach my $x (keys(%D)) { 160 foreach my $x (keys(%D)) {
161 $data->{$x} = (defined($data->{$x}) && ref($data->{$x}) eq 'HASH') ? 161 my $xref = $data->{$x};
162 {%{$data->{$x}},%{$D{$x}}} : 162 if (defined($xref) && ref($xref) eq 'HASH') {
163 $self->create($D{$x}); 163 foreach my $id (keys %{$D{$x}}) {$xref->{$id} = $D{$x}{$id}}
164 } else {
165 $data->{$x} = $self->create($D{$x});
166 }
164 }; 167 };
165} 168}
166 169
167# 170#
168# Get the names of all items 171# Get the names of all items

Legend:
Removed from v.2658  
changed lines
  Added in v.2771

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9