in reply to Creating a pseudo-module/package on a remote (CGI) server?

Just an extra tip in addition to jettero, dirving advice. Add your custom directories to perl's search path by using unshift(@INC,"/custom dir path");
  • Comment on Re: Creating a pseudo-module/package on a remote (CGI) server?

Replies are listed 'Best First'.
Re^2: Creating a pseudo-module/package on a remote (CGI) server?
by PockMonk (Beadle) on Dec 21, 2006 at 10:21 UTC
    Could you just explain this a bit more please and how it differs to specifiying the path via "lib"??

      the man says:

      Saying
      use lib LIST;
      is almost the same as saying
      BEGIN { unshift(@INC, LIST) }
      For each directory in LIST (called $dir here) the lib module also checks to see if a directory called $dir/$archname/auto exists. If so the $dir/$archname directory is assumed to be a corresponding architecture specific directory and is added to @INC in front of $dir.

      ...in other words use lib is far cleaner, and does a bundle more bookkeeping, for you ... (also, it does it in a BEGIN - which you may forget should should you manipulate @INC directly

      sorry of the <code>'s are in silly places...

      @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
        Gotcha. thank you :-)