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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |