[cgiapp] Re: [announce] OO MVC jumpstart/starter application

Mark Stosberg mark at summersault.com
Fri Dec 5 09:39:52 EST 2008


> Either use FindBin or FindBin::Real,

I usually do this in the instance script. It works reliably. It doesn't work
under mod_perl, but you can set an environment variable there instead
for PERL5LIB.

use FindBin '$Bin';
use lib "$Bin/../../config";

Notice there is no need to use double quotes about '$Bin' when you are
importing it. That's because you are naming a symbol to import, not
interpolating it. But of course you *must* use double quotes around "$Bin"
on the "use lib" line, because there you *are* interpolating it. 

Unix allows you mix the absolute path of "$Bin" with the relative path
of "../../config" to return a correct result. Vary the number of "../"
as needed.

   Mark

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   mark at summersault.com     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .




More information about the cgiapp mailing list