Gerald Butler <[EMAIL PROTECTED]> wrote:
Isn't there something like:
{ my $s does LEAVE { destroy $s } = new CoolClass; # ... do stuff that may throw ... }
Or something like that?
Not currently. There used to be a C<destroy> opcode, but I've deleted it, because I thought it's too dangerous.
We really need to put it back in -- I knew it was dangerous, but it was necessary. We should probably make it 'safe' by forcing the destroyed PMC to be an Undef after destruction, in case something was still referring to it.
-- Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk