in reply to Cloning shared hashref
Storing a reference to a shared structure into a non-shared scalar isn't a good idea. Correct that and you get a clue as to the problem:
use threads; use threads::shared; use Clone; use Data::Dumper; my $x :shared = shared_clone({ a => 'Foo', b => 'Bar' }); my $z = Clone::clone($x); print Dumper($z); __END__ C:\test>junk25 Don't know how to handle magic of type \156 at C:\test\junk25.pl line +11.
Basically, Clone has never been updated to work with shared data, which is rather more than normal tied data.
This all begs the question of why you want to clone a shared structure to a non-shared?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Cloning shared hashref
by menth0l (Monk) on Jan 20, 2011 at 14:44 UTC | |
by BrowserUk (Patriarch) on Jan 20, 2011 at 15:48 UTC | |
by menth0l (Monk) on Jan 21, 2011 at 08:12 UTC | |
by BrowserUk (Patriarch) on Jan 21, 2011 at 08:39 UTC | |
by jwba (Novice) on Mar 16, 2011 at 21:43 UTC | |
by BrowserUk (Patriarch) on Mar 16, 2011 at 23:04 UTC | |
by jwba (Novice) on Mar 17, 2011 at 19:05 UTC |