Matthew Knopp wrote:

> Interestingly I can "fix" the problem by setting PAR_CLEAN=1. 

OK, PAR_CLEAN=1 prevents
extraction of the shared libs (e.g. DBI.so) from the PAR archive
into the /tmp/par-USER/cache-SHA1 directory, they're extracted into
/tmp/par-USER/temp-$$ instead...

> A Little testing with DBI showed the following: 
> 
> unset PAR_CLEAN
> perl borkbork.pl
>     DBI 1.48-ithread default trace level set to 0x0/9 (pid 26847)
>     -- DBI::END
>     DBI 1.48-ithread default trace level set to 0x0/9 (pid 26847)
>     [goes loopy here]

Looks like DBI.pm's import is executed all over again.

It's definitely not the END block in DBI.pm, the infinite loop is entered
even later (during the destruction of objects upon program exit).

DBI.pm contains no DESTROY method (tough strace'ing the script shows
attempts to load a file called DESTROY.al, that's typical behaviour
of AutoLoader searching for a DESTROY method), in fact I fail to see
that class DBI is meant to be instantiated at all (class methods only).
Anyway, adding an empty DESTROY method to DBI.pm:

package DBI;

sub DESTROY {}

cured the infinite loop. (It also showed that a DBI object exists.)
But that still doesn't explain the weird behaviour when loading DBI from a PAR.

Cheers, Roderich

Reply via email to