This meditation was inspired by reading storing and using LoL path: indeed most of us could hardly make sense of the question being asked. After some thought AIUI it boils down to the OP's wanting to store a dereferencing chain (of a complex data structure) as a single "entity" somewhere. Now this is strictly impossible in Perl 5, although there are modules that can provide functionality that will come close to that. OTOH I wonder whether in Perl 6 there is or there could be any provision for such a thing, that is, for a $dereferencer object to "hold", say

<foo>[1]<bar><baz>[3]

in such a way that

$datastructure.$dereferencer

would DWIM.

I know I'd better ask this in p6l, but I've not been there for a long time and I prefer to discuss this topic here. Hopefully someone will report it there if judging it worth to end up in that place.

Update: I changed curlies to angular parens above, thanks to the observation by gaal. I knew, but constantly keep thinking in Perl 5...


In reply to [Perl 6] Any provision for a "dereferencing object"? by blazar

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.