Re: Perl on Win32, with Apache
From: gnu valued customer (tlviewer_at_yahoo.com)
Date: 03/05/04
- Previous message: tadmc_at_augustmail.com: "Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)"
- In reply to: Regent: "Perl on Win32, with Apache"
- Next in thread: gnari: "Re: Perl on Win32, with Apache"
- Reply: gnari: "Re: Perl on Win32, with Apache"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 05 Mar 2004 08:32:01 GMT
hello,
"Regent" <arthur0421@163.com> wrote in message
news:c29c2d$1pkd$1@mail.cn99.com...
> I have a Perl-based web site, of which each script must "require" a
> commonstuff.pl that simply defines some common subroutines and
> constants. If I don't put commonstuff.pl in any of the @INC paths, how
> should I efficiently include it in each script, avoiding such lines as
>
> require "d:/wwwroot/cgi-bin/commonstuff.pl";
>
> Of course I also tried the following:
>
> unshift (@INC, "d:/wwwroot/cgi-bin");
> require ("commonstuff.pl");
>
> However I hate to do such path-specific things in the many scripts.
Thanks!
>
> Regent
use File::Basename;
chdir(dirname( $0 ));
require("commonstuff.pl");
No hard-coded path here, so it might be what you want.
good luck,
Mark
- Previous message: tadmc_at_augustmail.com: "Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)"
- In reply to: Regent: "Perl on Win32, with Apache"
- Next in thread: gnari: "Re: Perl on Win32, with Apache"
- Reply: gnari: "Re: Perl on Win32, with Apache"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|