- foreach my $c (keys %setup) {
- if (defined $setup{$c}) {
- if (! ref $setup{$c}) {
- $config{$c}=possibly_foolish_untaint($setup{$c});
- }
- elsif (ref $setup{$c} eq 'ARRAY') {
- $config{$c}=[map { possibly_foolish_untaint($_) } @{$setup{$c}}]
- }
+ return "\t$prefix$key => $dumpedvalue,";
+} #}}}
+
+sub dumpvalues ($@) { #{{{
+ my $setup=shift;
+ my @ret;
+ while (@_) {
+ my $key=shift;
+ my %info=%{shift()};
+
+ next if $key eq "plugin" || $info{type} eq "internal";
+
+ push @ret, "\t# ".$info{description} if exists $info{description};
+
+ if (exists $setup->{$key} && defined $setup->{$key}) {
+ push @ret, dumpline($key, $setup->{$key}, $info{type}, "");
+ delete $setup->{$key};
+ }
+ elsif (exists $info{example}) {
+ push @ret, dumpline($key, $info{example}, $info{type}, "#");