That depends a bit on what your XML looks like - XMLin will usually return a hashref, but there is some XML that will cause it to return an arrayref. So if you wanted to play it safe you could say isa => 'HashRef | ArrayRef', or if you know your XML will always look a certain way and so XMLin will always return a hashref, just say isa => 'HashRef', which should make the rest of your code easier because it doesn't have to check every time if it's a hashref or arrayref. Ref is a superset that includes a whole lot more than hashrefs and arrayrefs, so it's probably too general. For all the details see Moose::Manual::Types. By the way, XML::Simple is not really recommended for new code, see for example this thread.
(Update: Your Mother already replied as I was typing, so yeah :-) )
In reply to Re^5: Object as Moose Object attribute
by Anonymous Monk
in thread Object as Moose Object attribute
by An4ximandre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |