If you've defined two explicit cases for $inner (scalar or array ref), you can always differentiate it from a hash ref, so why not just make the \%attr optional and just omit the empty hashes {}?Yes, I certainly thought of that. And you will often simply provide content without attributes, so I think that is a nice shorthand.
In reply to Re^2: A data structure for XML generation
by metaperl
in thread A data structure for XML generation
by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |