in reply to Win32 Apache && File::Basename

I'm a little hesitant to use the Win32 method because I want the program to be able to run on linux etc without any editing to speak of.

Does anyone have any suggestions as to how I could do that?


-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d- s:++ a--- C++++ UL P+++>++++ L+ E- W++>+++ N !o K- w+ O---- M-- V--
PS PE Y- PGP t++(+++) 5(+++)++++ X R+@ tv+ b+++ DI+ D- G e->+++ h! r-- y-
------END GEEK CODE BLOCK------
Translate


"Weird things happen, get used to it."

Flame ~ Lead Programmer: GMS

Replies are listed 'Best First'.
Re: Re: Win32 Apache && File::Basename
by trs80 (Priest) on Jan 22, 2002 at 06:39 UTC
    The my first post demonstrates the use of $ENV{SCRIPT_FILENAME} which is Unix and Win32 safe.
    Don't let the benchmark scare you off from using it.
    Did you need something different from that?
      Actually, I must confess, I don't really understand what the benchmarks reproted. Obviously I'd want to go for speed as much as possible, but compatability is more important at the moment. So I guess I will use $ENV{'SCRIPT_FILENAME'}.

      Out of curiosity, does anyone have any idea what MAKES it the slowest?


      -----BEGIN GEEK CODE BLOCK-----
      Version: 3.12
      GIT d- s:++ a--- C++++ UL P+++>++++ L+ E- W++>+++ N !o K- w+ O---- M-- V--
      PS PE Y- PGP t++(+++) 5(+++)++++ X R+@ tv+ b+++ DI+ D- G e->+++ h! r-- y-
      ------END GEEK CODE BLOCK------
      Translate


      "Weird things happen, get used to it."

      Flame ~ Lead Programmer: GMS

        Yes it's a tied hash under the hood, which means it's calling perl subroutines for every access, which ultimately have to call the C routines, getenv() and/or putenv() (as appropriate).

        See my post, Re(2): Win32 Apache && File::Basename.

        dmm