in reply to Re: perl crash during global destruction
in thread perl crash during global destruction

Oh, and don't construct instances of a class in the class's destructor - that leads to unhappiness.
He did not do that, did he?

Cheers, Christoph
  • Comment on Re^2: perl crash during global destruction

Replies are listed 'Best First'.
Re^3: perl crash during global destruction
by GrandFather (Saint) on Mar 31, 2010 at 22:08 UTC
    Oh, and don't construct instances of a class in the class's destructor
    He did not do that, did he?

    In the crash case OP presented that is exactly what he did:

    package foo; ... $f=Foo->new(); sub DESTROY {Foo->new()}

    supplies a Foo destructor that creates a new Foo instance. Note that the new destructor replaces the original destructor. It would have been clearer (and the OP may have figured things out for himself) if OP had supplied a stand alone sample script that demonstrated the issue.


    True laziness is hard work