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