in reply to Re: De-Overload reference?
in thread De-Overload reference?
What problem are you trying to fix?
It appears you think the following is an example of the problem:
use v5.36; use overload q{%{}} => sub { { foo => 1 } }; sub foo { $_[0]->{foo} } my $x= bless { foo => 2 }, "main"; say $x->foo;
But there's no infinite loop in that program, and the OP asks how to avoid an infinite loop.
[choroba's answer has the same problem, I think.]
I wish the OP would have provided a demo the problem and stated what they were trying to achieve.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: De-Overload reference?
by NERDVANA (Priest) on Apr 17, 2024 at 23:12 UTC | |
|
Re^3: De-Overload reference?
by LanX (Saint) on Apr 17, 2024 at 22:15 UTC |