Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) The CORE
<%args>
        $name => undef
        $SETS => undef
</%args>

<%init>
        return  undef   if (! ref($SETS));
        return  undef   if (! $name);

        my $FIELDS = {};
        while (my ($element,$value)=each %{$SETS}) {
                if ($element =~ /^${name}_key_(\d+)$/ && $SETS->{"${name}_value_$1"}) {
                        $FIELDS->{$value}=$SETS->{"${name}_value_$1"};
                }
        }
        {
                local $Data::Dumper::Indent = 0;
                return Data::Dumper::Dumper($FIELDS);
        }
</%init>