On 10/4/06, Jerry Hedden <[EMAIL PROTECTED]> wrote:
I'm considering a one line addition to the threads module to overload
the string value of a thread to return its ID:

  '""' => sub { shift->tid() }

Since thread IDs are unique, thread objects could be used as hash keys
in a more rational way:

Better would be letting the stringified object still look like a
stringified object. Perhaps you add your info on the end like C<<
',tid=' . $obj->tid  >>. I get a lot of mileage out of noticing what
things look like when printed. It's unusual when an object doesn't
stringify to something to that looks like an object.

Josh

Reply via email to