|
|
| P is for Practical | |
| PerlMonks |
Re^2: A data structure for XML generationby metaperl (Curate) |
| on Aug 11, 2009 at 14:16 UTC ( [id://787637]=note: print w/replies, xml ) | Need Help?? |
|
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 Section
Meditations
|
|
||||||||||||||||||||||||||||||||||