In article <AC620479-1A75-4311-B2B0-0CBC9833B8D3[at]cpan.org>,
sprout[at]cpan.org (Father Chrysostomos) wrote:
> It seems to work fine now, except that, if a Parser object is
created
> within a thread *other than* the main thread, perl complains about
> leaking scalars when the program exits.
>
> $ perl -MHTML::Parser -Mthreads -le'(async{new HTML::Parser})->join;
> END { print "end" }'
> end
> Scalars leaked: 1
However, perldoc threads says:
> Returning objects from threads does not work.
So don't do what you did in that example. :-)
/Bo Lindbergh
I'm sorry. You're right. My example was badly written. If I put ";
return" before the closing brace, it works.
Father Chrysostomos