Destroying an object

2005-10-18 Thread Mulander
--cut-- sub destroy_self { my $self = shift; $self = undef; } --cut-- The destroy method must be named DESTROY ( case-sensitive ) So you would have to do: sub DESTROY { my $self = shift; undef $self; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Destroying an object

2005-10-18 Thread Jeff 'japhy' Pinyan
On Oct 18, Daniel Kasak said: I've got an OO object that I want to destroy from inside the object itself. sub destroy_self { my $self = shift; $self = undef; } But this doesn't work. What is the correct way of doing it? That's because you're not getting rid of the CONTENTS of the object,

Re: Destroying an object

2005-10-18 Thread Daniel Kasak
Jeff 'japhy' Pinyan wrote: On Oct 18, Daniel Kasak said: I've got an OO object that I want to destroy from inside the object itself. sub destroy_self { my $self = shift; $self = undef; } But this doesn't work. What is the correct way of doing it? That's because you're not getting rid

Destroying an object

2005-10-17 Thread Daniel Kasak
Greetings. I've got an OO object that I want to destroy from inside the object itself. I'm trying: sub destroy_self { my $self = shift; $self = undef; } But this doesn't work. What is the correct way of doing it? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific