Show quoted text> Transaction: Ticket created by MSCHWERN
> Queue: threads-shared
> Subject: Allow CODE refs to be shared.
> Broken in: 1.33
> Severity: Wishlist
> Owner: Nobody
> Requestors: mschwern@cpan.org
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=57218 >
>
> I was trying to share a Digest::SHA::PurePerl object and got the
> following error from C<< shared_clone( Digest::SHA::PurePerl->new ); >>
> "Unsupported ref type: CODE".
>
> It strikes me that unlike the other reference types, a code ref is
> pointing at inherently read-only data. So its effectively always
> shared, unless there's an issue if its a closure?
>
> Either way, this is a feature request for sharing code refs to work.
This is a good request, and I would add that if this could be
done, then regexp's should also be made shareable.
This request is more appropriate for a perlbug ticket against core
because I'm sure it would involve changes beyond shared.xs code.