in reply to Object as Moose Object attribute

Sounds like your $xml is the result of XML::Simple's XMLin($xml) and not an XML::Simple->new object.

Replies are listed 'Best First'.
Re^2: Object as Moose Object attribute
by An4ximandre (Novice) on Nov 02, 2015 at 20:14 UTC

    Oh I am such an idiot, I just get it. Then what I need, is not An Xml::Simple, but the type of XMLin ... which is a data structure. Then how can I handle this as an attribute ?

    How I think I got it , I can use isa=>'Ref' ?

      :P HashRef. You're doing fine. Keep it up!

        Thanks, By the way what is better for this case Ref or hashRef ? And why ?