Re: DESTROY Issue

2004-05-27 Thread Dirk Bremer \(NISC\)
> Some light from Camel book 3rd edition, > 12.6.1. Garbage Collection with DESTROY Methods: > "When an interpreter shuts down, all its objects are destroyed, > which is important for multithreaded or embedded Perl applications. > Objects are always destroyed in a separate pass before ordinary > re

Re: DESTROY Issue

2004-05-26 Thread Lev Alexandrovsky
Hello! Wednesday, May 26, 2004, 18:40:39, Dirk wrote: >> The "global destruction" starting earlier than destructor of this class. >> Try to undef class object before exit program. DBN> Lev is onto something here. When I place $Log = undef just before the exit DBN> in MovePDF, the filehandle exis

Re: DESTROY Issue

2004-05-25 Thread Dirk Bremer \(NISC\)
> What happens if you replace the: > > LogClose(shift); > > with > $_[0]->LogClose(); > > Cheers > Tobias > > > > Note the following code: > > > > sub DESTROY() {LogClose(shift); $Smtp->quit if (defined $Smtp)} > > > > I am getting an error when the DESTROY sub invokes the > > LogClose sub. The

RE: DESTROY Issue

2004-05-25 Thread Tobias Hoellrich
To: [EMAIL PROTECTED] > Subject: DESTROY Issue > > > Note the following code: > > sub DESTROY() {LogClose(shift); $Smtp->quit if (defined $Smtp)} > > I am getting an error when the DESTROY sub invokes the > LogClose sub. The error is as follows: > > (in cleanup) Un

DESTROY Issue

2004-05-25 Thread Dirk Bremer \(NISC\)
Note the following code: #! C:/perl/bin/perl -w # AmsLog.pm 05/24/2004. package AmsLog; # Declare pragmas. use diagnostics; use strict; use warnings; use constant DEBUG => 0; # Declare modules. use FindBin qw($Bin); use lib $Bin; use Date::Format; use Fcntl qw(:DEFAULT :flock); use FileHandle;