in reply to Re: Win32 Apache && File::Basename
in thread Win32 Apache && File::Basename

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?

Replies are listed 'Best First'.
Re: Re: Re: Win32 Apache && File::Basename
by Flame (Deacon) on Jan 22, 2002 at 07:52 UTC
    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

        Ahh, I didn't know that it was a tied hash. Learn something new every day :)

        Thanks

        "Weird things happen, get used to it."

        Flame ~ Lead Programmer: GMS