Sick idea for shared

sky on 2001-05-01T11:55:02

It would be nice not only to allocate a new shared variable by doing $foo = shared();

One way of doing this might be to do this
$foo = { bar => "foo" };
shared($foo);
And in shared so
shared_ref = shift;
shared = shared_ref->deref
new_shared = new_unattached_sv;
clone(new_shared, shared);
kill(shared);
shared_ref->reference = new_shared;
end

Might just work, or might be bad bad bad :), probobly is bad bad bad.

Artur