I could wish for a clearer description of your problem than, it doesn't work.

What doesn't work? Does the solution not provide a complete answer? I said that it didn't, and said what the unaddressed hard bit is. Does the technique do what I said it would? Yes. Does the technique presented show something useful to what you want to do? I believe so. Come up with a way of comparing the data structure that you are passed in with others that you have seen and then alias it by force. The hard part is doing that tracking. Does this have anything to do with how Storable implements its thaw method? Not that I can see.

Given how long my day has been I am not going to write the code for a full implementation. But I assure you that it is fairly straightforward to take the incoming structure, stringify using Storable (preferably with the canonical flag set to true), use Digest::MD5 to produce a short key, and look in a hash of other thawed structures for your element. Making this recursive to catch substructures is also doable.

But I haven't implemented this tonight, so this post has nothing that will work out of the box.


In reply to Re: Re: Re: Re: Re: How to change referent of lexical reference? by tilly
in thread How to change referent of lexical reference? by autarch

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.