in reply to Strange code execution with 'AUTOLOAD'
Since you have Object Oriented Perl, I suggest you look at page 112, at the section "Destructors and autoloading". It explains the situation far better than I can, and offers a solution (actually, two).
For those who don't have the book :), the best solution is to define an empty DESTROY method in your class:
The existence of this method will prevent AUTOLOAD from being called on object destruction.sub DESTROY { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Strange code execution with 'AUTOLOAD'
by DrZaius (Monk) on Jul 01, 2001 at 23:40 UTC | |
by btrott (Parson) on Jul 02, 2001 at 04:38 UTC |