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 o
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,
--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,
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 High