LPM: Module question

David Hempy hempy at ket.org
Tue Jan 25 16:44:28 CST 2000


At 03:23 PM 1/25/2000 -0500, you wrote:
>
>you can do a 
>use lib './';

Thanks for the tip, Matt.  This still had problems when run as CGI, but
told me know what I was looking for.

My final solution comes from the Cookbook, Chapter 12.7. Keeping Your Own
Module Directory:

>...suppose you have a program called /wherever/spectre/myprog that needs to 
>look in
>/wherever/spectre for its modules, but you don't want to hardcode that path.
>
>use FindBin;
>use lib $FindBin::Bin;

Thus, my code to include pressroom.pm in the same directory ends up looking
like:

use FindBin;			
use lib $FindBin::Bin;
use pressroom;		#page footers and other common subs.


My thanks go out to the group's collective knowledge again!

-dave


--
David Hempy
Internet Database Administrator
Kentucky Educational Television




More information about the Lexington-pm mailing list