How about using the original stringification plus the thread id? Make numification use the thread id instead.
use overload '""' => \&as_string, '0+' => \&as_number; sub as_string { # Foo::Bar=HASH(0xDEADBEEF),tid=42 my $self = shift @_; return overload::StrVal( $self ) . ',tid=' . $self->tid; } sub as_number { return shift->tid; }
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: [RFC] Stringifying a thread
by diotalevi
in thread [RFC] Stringifying a thread
by jdhedden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |