in reply to Re: Perl & Simple::XML
in thread Perl & Simple::XML

Making it a default for all tags, including those that are no allowed to be repeated in the XML would cause the resulting data structure to be overly complex and hard to navigate. You would not want to have to write $data->{foo}[0]{bar}[0]{baz}[0] instead of $data->{foo}{bar}{baz}, especially if you knew for sure non of the tags in question can ever be repeated.

Do use ForceArray, but only use it for the tags that can be repeated. And there, us it for all such tags.