in reply to main script invoked twice
I see your point about the buffering. I initially ignored that not only because the exec fit, but because one of the first things the first method called does is unbuffer output.
So here's my follow-up: is there another way to deal with the problem the exec's are trying to solve? The issue there is that we want the Perl packages to be as self-contained as possible. If a package relies on an environment setting that gives it information needed to dynamically load shared libraries then the setting occurs too late. Our answer was to put the environment settings in BEGIN blocks, and have any that know they have the dynamic load dependency re-execute the script after the environment is set. This worked until we also introduced some dynamically loaded Perl modules -- at the point those BEGIN blocks are called now, we could be in the middle of processing and not truly at the beginning of the entire program execution. Any ideas there?
|
|---|