Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 32860 invoked from network); 7 Feb 2008 03:10:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2008 03:10:46 -0000 Received: (qmail 24989 invoked by uid 500); 7 Feb 2008 03:10:34 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 24966 invoked by uid 500); 7 Feb 2008 03:10:34 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 24955 invoked by uid 99); 7 Feb 2008 03:10:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 19:10:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.93.22.231] (HELO bogota.connexer.com) (66.93.22.231) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 03:10:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by bogota.connexer.com (Postfix) with ESMTP id 7C083C02D for ; Wed, 6 Feb 2008 22:10:09 -0500 (EST) Received: from bogota.connexer.com ([127.0.0.1]) by localhost (bogota.connexer.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QZMWW2aqxlXp for ; Wed, 6 Feb 2008 22:10:09 -0500 (EST) Received: from miami.connexer.com (miami.connexer.com [66.93.22.253]) by bogota.connexer.com (Postfix) with ESMTP id 57F26C01E for ; Wed, 6 Feb 2008 22:10:09 -0500 (EST) Received: by miami.connexer.com (Postfix, from userid 2000) id C85FC50238; Wed, 6 Feb 2008 22:10:08 -0500 (EST) Date: Wed, 6 Feb 2008 22:10:08 -0500 From: Roberto =?iso-8859-1?Q?C=2E_S=E1nchez?= To: modperl@perl.apache.org Subject: Re: Question about open() Message-ID: <20080207031008.GA15116@connexer.com> Mail-Followup-To: modperl@perl.apache.org References: <1cbd6f830802061906g1ad567bbifc35143a4d972e25@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <1cbd6f830802061906g1ad567bbifc35143a4d972e25@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Checked: Checked by ClamAV on apache.org --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 06, 2008 at 10:06:05PM -0500, Mag Gam wrote: > Hi All, >=20 > I have been using mod_perl, and I have several perl-cgi files that use the > open(). I use this function to open/include my header, footer, basically a > poor man template system. Currently, when I open a file I have to use the > absolute path (/var/www/appname/top.inc). Is it possible for me to use j= ust > 'top.inc'? I think it trying to read from DocumentRoot, which is causing = the > issue. Has anyone ever faced this? >=20 I just set something like this in global.asa: my $base_dir =3D cwd . '/'; Then I can make the $base_dir available globally and just use that anywhere I need to refer to an on disk file. Regards, -Roberto --=20 Roberto C. S=E1nchez http://people.connexer.com/~roberto http://www.connexer.com --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHqnaQ5SXWIKfIlGQRAui5AKCb+dxo6Se7QhTUsKYnIbYUdzcoSwCguzi8 +yLFnkIF7CcF2aw4eBc/jnE= =y9pZ -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j--