develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #112104] die($object) in thread reblesses $object intomain and breaks stringification

From:
Zefram
Date:
December 14, 2017 04:38
Subject:
Re: [perl #112104] die($object) in thread reblesses $object intomain and breaks stringification
Message ID:
20171214043813.GE25404@fysh.org
Lasse Makholm wrote:
>I haven't been able to find any mentioning of this issue anywhere

The "bugs and limitations" section of the threads.pm documentation has a
note that returning blessed objects doesn't work.  As discussed on [perl
#96538], making it work would involve maintaining more of a link between
objects in different threads than we can handle.  The reblessing is crap,
but so is the undef that you get by returning a blessed object as your
non-error result.  To return blessed objects you'll have to arrange your
own serialisation.

This ticket should be closed.

-zefram



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About