how'd you do that?

See the module Object::MultiType (link in the main node). To make it work I have used overload, where you can use methods to return the value of an object when it's accessed as ${}, @{}, %{}, &{}, *{}, and other ways (see the overload POD).

I have used a Saver object inside the main object too, where the different data types are saved. And other cool thing, is that all the different objects that are returned from XML::Smart, share the same XML tree, soo, when an object comes from another (clone), it's the same obj, but that points to a different part in the tree, what use less memory.

Than I linked the overload resource with a tied HASH and ARRAY that work togetther to work Smart with the XML tree. ;-P

See the source of the module, it's at least educational, but I think it cool too. ;)

Graciliano M. P.
"The creativity is the expression of the liberty".


In reply to Re: Re: XML::Smart - Development in final stage. (beta is out) by gmpassos
in thread XML::Smart - Development in final stage. (beta is out) by gmpassos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.