Skip Menu |

This queue is for tickets about the threads-shared CPAN distribution.

Report information
The Basics
Id: 57218
Status: open
Priority: 0/
Queue: threads-shared

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.33
Fixed in: (no value)



Subject: Allow CODE refs to be shared.
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.
CC: pp <perl5-porters [...] perl.org>
Subject: Re: [rt.cpan.org #57218] Allow CODE refs to be shared.
Date: Wed, 5 May 2010 11:00:34 -0400
To: bug-threads-shared [...] rt.cpan.org
From: "Jerry D. Hedden" <jdhedden [...] cpan.org>
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.