http://qs1969.pair.com?node_id=455251


in reply to Re: pod2usage question
in thread pod2usage question

The Big Reason(TM) for the BEGIN block is to allow for use'ing the MoveDataTools package in a dynamic way.
For example, we don't really know where the user installed this script, but we do know where the libs were installed in relation to the script. The BEGIN block is there to help figure out the correct LIB path, based on the script's path.
I am also trying to keep this seperate from the local perl install to avoid poluting it with extra stuff, that we don't really want to give global access to.
This whole thing is really weird because it works fine on the Windows box I built this on, and except for the pod2usage call works fine on a linux machine as well.
Bummer!
In any case, thank you all for your input on this!

Replies are listed 'Best First'.
Re^3: pod2usage question
by SolidState (Scribe) on May 10, 2005 at 13:05 UTC

    The BEGIN block is there to help figure out the correct LIB path, based on the script's path.

    The FindBin module might here you there. Check out the synopsys examples.

    Regarding the Pod::Usage problem, what happens if you move the "use Pod::Usage" line outside (before) the BEGIN block? Does that help?

    HTH :-)