Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 39459 invoked from network); 7 Feb 2008 20:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2008 20:46:07 -0000 Received: (qmail 36026 invoked by uid 500); 7 Feb 2008 20:45:54 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 36013 invoked by uid 500); 7 Feb 2008 20:45:54 -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 36000 invoked by uid 99); 7 Feb 2008 20:45:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 12:45:54 -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: domain of pharkins@gmail.com designates 66.249.82.232 as permitted sender) Received: from [66.249.82.232] (HELO wx-out-0506.google.com) (66.249.82.232) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 20:45:25 +0000 Received: by wx-out-0506.google.com with SMTP id i29so3012359wxd.7 for ; Thu, 07 Feb 2008 12:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=dRDR0mb9VQssZ0//3OvQ41P0Q639m/e0ZlHxEDvFaII=; b=HF5oEg4SNphOu408OPkj3chlyNwqfx/g2WGrrJxDEn1NTYKFOJKtnjMLRXSSToVgA9LnHUhcI8JzybztpDI0e1hwdkwTfjrqHXsNkAGWR2bmLnub0CA4r8OG+RiJs+qqfzICe5TG6UdBtbApE7P64SQMN7yBnfd4xH22zZ5jhkQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=DRPSWKeRoFEdYjaJqVfd2EP+uCTWNkkBOTk4Uq4OCD7eexklRAAlb7Loa8CTnqbDtDj/+1tzHfvke7CuICC79DA0dCtnRG8uZVZ75bd3Kby0AKIWyBEIo3IFQe+XI+GtR3zh+wFkdllcontCzv+P7vrIBtGOFH0EJO+zeGhBylQ= Received: by 10.115.90.1 with SMTP id s1mr12092780wal.41.1202417123107; Thu, 07 Feb 2008 12:45:23 -0800 (PST) Received: by 10.114.156.13 with HTTP; Thu, 7 Feb 2008 12:45:23 -0800 (PST) Message-ID: <66887a3d0802071245y5e84b79cq6a839d3e62c99118@mail.gmail.com> Date: Thu, 7 Feb 2008 15:45:23 -0500 From: "Perrin Harkins" Sender: pharkins@gmail.com To: "Mag Gam" Subject: Re: Question about open() Cc: modperl In-Reply-To: <1cbd6f830802061906g1ad567bbifc35143a4d972e25@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1cbd6f830802061906g1ad567bbifc35143a4d972e25@mail.gmail.com> X-Google-Sender-Auth: 2d66bb365cfbaf35 X-Virus-Checked: Checked by ClamAV on apache.org On Feb 6, 2008 10:06 PM, Mag Gam wrote: > 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 just > 'top.inc'? You can either use DocumentRoot (http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_document_root_) or use ModPerl::RegistryPreFork which will chdir to the directory your script is in just like a normal CGI script does. That would let you use files relative to the script. - Perrin