Line # Revision Author
1 8 ahitrov@rambler.ru <%args>
2 225 ahitrov
3 $name => undef
4 $SETS => undef
5 $object => undef
6
7 8 ahitrov@rambler.ru </%args>
8
9 <%init>
10
11 225 ahitrov return undef if (! ref($SETS));
12 return undef if (! $name);
13
14 my $FIELDS = {};
15 while (my ($element,$value)=each %{$SETS}) {
16 if ($element =~ /^${name}_key_(\d+)$/ && $SETS->{"${name}_value_$1"}) {
17 $FIELDS->{$value}=$SETS->{"${name}_value_$1"};
18 }
19 }
20 return $object->_serialize($FIELDS);
21
22 8 ahitrov@rambler.ru </%init>