Subject: | Synopsis example causes infinite recursion |
The example in the synopsis:
use overload::eval 'my_callback';
sub my_callback { print and eval for $_[0] }
causes infinite recursion, since the eval() called from within
my_callback calls my_callback again.
Possible fix:
{
sub my_callback { print and eval for $_[0] }
}
use overload::eval 'my_callback';