X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=all2xml.pl;h=7157de0fd6af3804daa0f84367028dcf36e5025f;hb=289e77c33b7348b915b59bf06f37447ae62a440d;hp=ad7f7173c8315b5b84892fa062de5a6ad3ca9031;hpb=fe332e59f660a2457001171ba694da95a3ca258c;p=webpac diff --git a/all2xml.pl b/all2xml.pl index ad7f717..7157de0 100755 --- a/all2xml.pl +++ b/all2xml.pl @@ -342,11 +342,21 @@ sub data2xml { if ($lookup_key) { print STDERR "WARNING: try to redefine lookup_key (keys shouldn't be repeatable fields!)"; } else { - $lookup_key = $display; + if ($filter) { + no strict 'refs'; + $lookup_key = &$filter($display); + } else { + $lookup_key = $display; + } } } elsif (lc($x->{type}) eq "lookup_val") { if ($lookup_key) { - $lhash{$lookup_key} = $display; + if ($filter) { + no strict 'refs'; + $lhash{$lookup_key} = &$filter($display); + } else { + $lhash{$lookup_key} = $display; + } } else { print STDERR "WARNING: no lookup_key defined for '$display'?"; }