[Omaha.pm] use lib "$ENV{J}/lib";

Jeff Bisbee jbisbee at gmail.com
Sun Dec 11 17:11:46 PST 2005


On 12/9/05, Jay Hannah <jhannah at omnihotels.com> wrote:
> This is pretty weird, but I got a call from a friend, and yes, indeed,
> you can set up @INC via "use lib" using an enfironmental variable...

If you're going to modify an environment variable why not PERL5LIB? 
(It's how we manage things at work).  (use "$ENV{J}/lib" is a cool
trick though) :)

Another trick I do is to define environment vars to turn on bits of debugging.

  use constant DEV_REQUEST => $ENV{DEV_REQUEST} || 0;
  ...
  warn "new request" if DEV_REQUEST;

Since this is done in mod_perl, if its false, the will be completely
skipped if DEV_REQUEST if false.

--
Jeff Bisbee / jbisbee at gmail.com / jbisbee.com


More information about the Omaha-pm mailing list