[tpm] use from a local directory

Cees Hek ceeshek at gmail.com
Wed Mar 23 15:32:23 PDT 2011


On Wed, Mar 23, 2011 at 6:15 AM, J. Bobby Lopez <jbl at jbldata.com> wrote:
> +1 for FindBin.. use it all the time.  That and CWD should help you
> accomplish whatever you need to do.
>

+1

Also FindBin::libs simplifies looking for a 'lib' directory somewhere
up the path of the script and automatically calls the correct 'use
lib'.

ie if your scripts are in project/bin and your pm files are in
project/lib, then all you need in your script files is this:

use FindBin::libs;

and project/lib will automatically be added to your @INC.

Cheers,

Cees


More information about the toronto-pm mailing list