in reply to Re^4: Object as Moose Object attribute
in thread Object as Moose Object attribute
Oh, well, whatever you want, as specifically as you expect is what to do. If the XMLin() will always return a HashRef for your data, then specify that. Otherwise something like \my $moo; can be considered valid XML in your object layer. Better to catch problems early. I think you can | (OR) stuff together too if you need to consider ArrayRef as well. I'm not even sure if XML::Simple allows for that. While we're on the topic XML::Simple is not really anyone's friend except in the most predictable and unchanging use. See Examples where XML::Simple is the optimal choice? and Stepping up from XML::Simple to XML::LibXML.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Object as Moose Object attribute
by An4ximandre (Novice) on Nov 02, 2015 at 20:59 UTC | |
by Your Mother (Archbishop) on Nov 02, 2015 at 21:14 UTC |