At 3:05 PM +0200 4/29/05, Leopold Toetsch wrote:
>Gerald Butler <gerald.butler@jewels.com> 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
dan@sidhe.org have teddy bears and even
teddy bears get drunk
Thread Previous
|
Thread Next