perlmeditation
blazar
<p>This meditation was inspired by reading [id://617570]: indeed most of us could hardly make sense of the question being asked. After some thought AIUI it boils down to the [rootcho|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 <c>$dereferencer</c> object to "hold", say</p>
<c>
<foo>[1]<bar><baz>[3]
</c>
<p>in such a way that</p>
<c>
$datastructure.$dereferencer
</c>
<p>would DWIM.</p>
<p>I know I'd better ask this in [http://www.nntp.perl.org/group/perl.perl6.language/|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.</p>
<p><strong>Update:</strong> I changed curlies to angular parens above, thanks to the [id://617882|observation] by [gaal]. I knew, but constantly keep thinking in Perl 5...</p>