Perl Monk, Perl Meditation | |
PerlMonks |
Re: A data structure for XML generationby ctilmes (Vicar) |
on Aug 11, 2009 at 13:16 UTC ( [id://787610]=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 {}?
I also think your example had a couple minor errors (extra array ref and no punctuation between 'children' and its children.)
In Section
Meditations
|
|