Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 37524 invoked from network); 14 Jan 2007 20:26:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jan 2007 20:26:26 -0000 Received: (qmail 34336 invoked by uid 500); 14 Jan 2007 20:26:27 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 34316 invoked by uid 500); 14 Jan 2007 20:26:27 -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 34305 invoked by uid 99); 14 Jan 2007 20:26:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jan 2007 12:26:27 -0800 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (herse.apache.org: transitioning domain of clint@traveljury.com does not designate 85.90.230.250 as permitted sender) Received: from [85.90.230.250] (HELO mail.traveljury.com) (85.90.230.250) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jan 2007 12:26:17 -0800 Received: from localhost (localhost [127.0.0.1]) by mail.traveljury.com (Postfix) with ESMTP id D9066FEFD; Sun, 14 Jan 2007 20:25:55 +0000 (GMT) Received: from mail.traveljury.com ([127.0.0.1]) by localhost (rambaldi.traveljury.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05769-03; Sun, 14 Jan 2007 20:25:51 +0000 (GMT) Received: from [192.168.5.4] (unknown [89.129.52.224]) by mail.traveljury.com (Postfix) with ESMTP id 64EF1FEFC; Sun, 14 Jan 2007 20:25:50 +0000 (GMT) Subject: Re: does begin block effect any performance in modperl From: Clinton Gormley To: abhishek jain Cc: modperl@perl.apache.org In-Reply-To: References: Content-Type: text/plain Date: Sun, 14 Jan 2007 21:25:48 +0100 Message-Id: <1168806348.28628.1.camel@getafix.traveljury.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at traveljury.com X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 2007-01-15 at 00:49 +0530, abhishek jain wrote: > Hi friends, > i need to know that if i add the following block then will it affect > anything in the execution of modperl apart from first time run. > BEGIN{ > require'abc.pl'; > require'large_file.pl'; > > }; > > I mean anything relative to the performance.is the begin block called > everytime orjust the first time and is it safe to define a function in > a file and call it with this method rather than a package , The begin blocks are only run at compile time, so won't affect the performance of future requests. http://perl.apache.org/docs/2.0/user/coding/coding.html#C_BEGIN__Blocks clint