If you insist on being able to use == for this, you could try turning $foo into an overloaded object whose == method checked that both sides freeze into the same string (with $Storable::Canonical set to a true value of course, and modulo what you need to do for the overload to operate).
In reply to Re: How to change referent of lexical reference?
by tilly
in thread How to change referent of lexical reference?
by autarch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |