http://qs321.pair.com?node_id=619220

iguanodon has asked for the wisdom of the Perl Monks concerning the following question:

I work with several AIX boxes where I don't have root access, and getting new modules installed is a long, difficult process. So far I've been able to install my own copy of Perl on a dev box, but not on any test or production ones. In order to use non-core modules in my scripts I opted to not install them locally, instead I've been packing them up with PAR on the dev box and distributing the binary to the test and prod environments. This all works fine... until it stops working. When I first install a PAR binary everything runs smoothly. But after some period of time (usually a few weeks), the script will die with this error:
String found where operator expected at ../../lib/Storable.pm (autospl +it into ../../lib/auto/Storable/_retrieve.al) line 319, near "logcroa +k "can't open $file: $!"" (Do you need to predeclare logcroak?) String found where operator expected at ../../lib/Storable.pm (autospl +it into ../../lib/auto/Storable/_retrieve.al) line 325, near "logcarp + "Storable::lock_store: fcntl/flock emulation broken on $^O"" (Do you need to predeclare logcarp?) String found where operator expected at ../../lib/Storable.pm (autospl +it into ../../lib/auto/Storable/_retrieve.al) line 328, near "logcroa +k "can't get shared lock on $file: $!"" (Do you need to predeclare logcroak?) syntax errorsyntax error at ../../lib/Storable.pm (autosplit into ../. +./lib/auto/Storable/_retrieve.al) line 325, near "logcarp "Storable:: +lock_store: fcntl/flock emulation broken on $^O"" syntax error at ../../lib/Storable.pm (autosplit into ../../lib/auto/S +torable/_retrieve.al) line 328, near "logcroak "can't get shared lock + on $file: $!"" Compilation failed in require at //export/home/user/perl/lib/5.8.8/Aut +oLoader.pm line 27. at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/retr +ieve.al) line 303
The last line there is strange, the path given in the "Compilation failed in require at" exists only on the dev box, but it gets printed on the other boxes. I don't know what to make of that but I thought it might be worth mentioning.

I thought this might be due to corruption of the file Storable is storing to, but deleting the file and letting it get get created again doesn't solve the problem. I also don't think the problem is corruption of the packed PAR file. I've just started tracking checksums to verify that but I'll have to wait until the problem reappears to know for sure.

But I've found that if I just re-pack the binary with PAR and distribute it again, it solves the problem. No changes to the code, just pack again and it starts working. Then the new binary will work for a few weeks and blow up again.

Any pointers to help me debug this further?