in reply to autoflush and 'DESTROY'
Add the line:
sub DESTROY {}
to the Chatbot::Eliza code to fix the warning. For some background on DESTROY see Object scope and DESTROY
From perlman:perltoot:
Destruction happens automatically via Perl's garbage collection (GC) system, which is a quick but somewhat lazy reference-based GC system. To know what to call, Perl insists that the destructor be named DESTROY. Perl's notion of the right time to call a destructor is not well-defined currently, which is why your destructors should not rely on when they are called.
Evidently autoflush is altering when DESTROY is called. I recall reading somewhere that you should include a DESTROY() method to avoid warnings like this but can't remember where for the life of me.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: autoflush and 'DESTROY'
by Juerd (Abbot) on Mar 16, 2002 at 21:00 UTC | |
by tachyon (Chancellor) on Mar 16, 2002 at 21:10 UTC | |
by Juerd (Abbot) on Mar 16, 2002 at 21:29 UTC | |
by tachyon (Chancellor) on Mar 17, 2002 at 09:32 UTC | |
by mirod (Canon) on Mar 17, 2002 at 07:14 UTC | |
by gellyfish (Monsignor) on Mar 17, 2002 at 09:03 UTC |