Show quoted text> In fact, I'm not sure to consider this as a bug. IMHO it is bad
style to
Show quoted text> use the same blockname multiple times without further arrangements.
There ARE further arrangements, and they are built into the module.
See your documentation under "Identical Options".
Maybe I should have given a slightly more elaborate example:
dir = "/project/files"
<file_type>
extension = ".c"
target = "$dir/sources"
</file_type>
<file_type>
extension = ".h"
target = "$dir/headers"
</file_type>
With this file you would get:
%config = {
dir => "/project/files",
file_type => [
{
mask = "*.h"
target = "/project/files/headers"
},
{
mask = "*.c"
target = "/project/files/sources"
}
]
};
So that you can say for example
foreach my $file_type (@{$config{'file_type'}}) {
for (glob($file_type->{'mask'})) {
copy($_, $file_type->{'target'});
}
}
if you also take the precaution to check for the case with only
one 'file_type' block. This used to be possible in version 2.31.
If you decide that identical blocks should not be used to create an
array, could you please update the documentation to say that its use
is not supported?
Cheers!