rndapology has asked for the wisdom of the Perl Monks concerning the following question:
Then, in the code with threads:around 'new' => sub { my $orig=shift; my $class=shift; my $self=$class->$orig(@_); my $shared_self : shared = shared_clone($self); return $shared_self; };
But then I get 'Unsupported ref type: CODE' at this line:my $obj :shared =new TheObject();
I am running 5.8.8 with threads-1.83/threads-shared-1.37. Anyone have an idea what is going on here? Does Moose even work with threads at all?my $shared_self : shared = shared_clone($self);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trying to share a Moose object between some threads
by Tanktalus (Canon) on Aug 15, 2011 at 19:46 UTC | |
|
Re: Trying to share a Moose object between some threads
by ikegami (Patriarch) on Aug 15, 2011 at 22:45 UTC | |
|
Re: Trying to share a Moose object between some threads
by BrowserUk (Patriarch) on Aug 15, 2011 at 20:39 UTC |