You can check the MOD_PERL envirement variable.  Something like:

        if ($ENV{MOD_PERL}) {
                # We're under mod_perl
        } else {
                # strait perl here
        }



-- 
Chris Reinhardt
[EMAIL PROTECTED]
Webmaster
Dynamic DNS Network Services
http://www.dyndns.org/
On 20 Apr 2001, Wayne Pascoe wrote:

> Hi there,
>
> I'm trying to roll out some software by one of our 3rd party
> developers. I'm trying to find out if the scripts will actually be run
> through mod_perl and not as cgi's.
>
> The only config changes that they have specified to my Apache config
> is as follows :
>
> Alias /cgi-bin/  /real/path/to/perl-scripts/
>
> <Location /cgi-bin>
>         SetHandler  perl-script
>         PerlHandler Apache::Registry
>         Options +ExecCGI
> </Location>
>
> They have not requested any settings like
> PerlWarn On
> PerlTaintCheck On
>
> There are also no use statements being required (eg use
> Apache::Registry() ) in the config.
>
> Is there any way to check that the scripts are being run through
> mod_perl and not as cgi's ?
>
> Thanks,
>
> --
> --Wayne--
> The time for action is passed.              | [EMAIL PROTECTED]
> Now is the time for sensless                | www.penguinpowered.org.uk
> bickering.                                  |
>

Reply via email to