[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 3333 Revision 3370
87# 87#
88sub add { 88sub add {
89 my $self = shift; my %D = (@_); return if scalar(@_) == 0; 89 my $self = shift; my %D = (@_); return if scalar(@_) == 0;
90 my $data = $self->{context}{$self->{dataName}}; 90 my $data = $self->{context}{$self->{dataName}};
91 foreach my $x (keys %D) { 91 foreach my $x (keys %D) {
92 Value::Error("Illegal $self->{name} name '$x'") unless $x =~ m/^$self->{namePattern}$/; 92 Value::Error("Illegal %s name '%s'",$self->{name},$x) unless $x =~ m/^$self->{namePattern}$/;
93 warn "$self->{Name} '$x' already exists" if defined($data->{$x}); 93 warn "$self->{Name} '$x' already exists" if defined($data->{$x});
94 $data->{$x} = $self->create($D{$x}); 94 $data->{$x} = $self->create($D{$x});
95 } 95 }
96 $self->update; 96 $self->update;
97} 97}

Legend:
Removed from v.3333  
changed lines
  Added in v.3370

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9