in reply to Re^2: $Bin undef with FindBin in web environment
in thread $Bin undef with FindBin in web environment

The assumption with suggestion 1 is that your cgi-bin directory is outside the document root, as in the typical $somepath/htdocs/ + $somepath/cgi-bin/ scenario. If your cgi-bin is inside the document root as in $somepath/htdocs/cgi-bin/, then you would indeed be at risk of serving modules as plaintext — but you risk the same for your scripts, as well.

Makeshifts last the longest.

  • Comment on Re^3: $Bin undef with FindBin in web environment

Replies are listed 'Best First'.
Re^4: $Bin undef with FindBin in web environment
by Anonymous Monk on Sep 01, 2004 at 16:20 UTC
    cgi-bin is outside the document root directory, in a script directory. I misunderstood your suggestion, which I thought was to place it all within the document root.

    In this case my objection is that the lib files are not strictly tied to the cgi scripts; they are also used by programs in bin/ for instance. Therefore it would seem like poor structure to me to put them within the cgi-bin directory.

    Furthermore, it would place the additional burden of knowing their place in nesting upon the scripts ('is it lib, ../lib, ../../lib, or ../../../lib?'). I tend to move programs around during development as new groupings become clear, despite the fact that cvs tries to disuade me from this practice.

    Anyhow, thank you for your help. I have decided to go with calculating the lib directory as described in my other replies, but I appreciate your suggestions.

      tachyon suggested that, not me. :-)

      Makeshifts last the longest.