Explanation on the upshot.

Tie allows an object to masquerade as a native Perl data structure. Perl maps operations into method calls, and just makes the right method calls. The return value from tie is the object. It is just a regular object, some of whose methods have names that are special to Perl.

The data structure is what gets tied, and what that means is that it has been replaced by a sort of facade. Accessing an element might do anything. Amazing, astounding, unbelievable - until you realize that this is nothing more than making Perl's native data structures look like method calls. An idea which some languages take much, much farther and integrate much better than Perl does.

BTW you can get from the data structure to the object with tied. But the object knows nothing about the data structure that has been tied to it.


In reply to Re (tilly) 2: Can Tie::IxHash be used to order elements in a list or hash of hashes? by tilly
in thread Can Tie::IxHash be used to order elements in a list or hash of hashes? by ybiC

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.