Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 57750 invoked from network); 24 May 2004 16:56:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 May 2004 16:56:30 -0000 Received: (qmail 86392 invoked by uid 500); 24 May 2004 11:56:21 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 78779 invoked by uid 500); 24 May 2004 11:54:08 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 68325 invoked by uid 98); 24 May 2004 11:50:53 -0000 Received: from richter@ecos.de by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(194.95.226.10):. Processed in 0.520864 secs); 24 May 2004 11:50:53 -0000 X-Qmail-Scanner-Mail-From: richter@ecos.de via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(194.95.226.10):. Processed in 0.520864 secs) Received: from unknown (HELO saturn.ecos.de) (194.95.226.10) by hermes.apache.org with SMTP; 24 May 2004 11:50:52 -0000 Received: from lnx1.i.ecos.de (unknown [194.95.226.11]) by saturn.ecos.de (Postfix) with ESMTP id E4D10D890F; Mon, 24 May 2004 13:50:42 +0200 (MET DST) Received: from wingr2 (unknown [10.11.12.250]) by lnx1.i.ecos.de (Postfix) with SMTP id A0B9DD3BD5; Mon, 24 May 2004 13:50:49 +0200 (MEST) Message-ID: <061f01c44185$5b800970$fa0c0b0a@wingr2> From: "Gerald Richter" To: "Stefan Cars" Cc: References: <95C889BBC85B2E408EF45A8E8B74CA1905BB04@kalle.ad.snowfall.se> Subject: Re: Execute or do ? Date: Mon, 24 May 2004 13:50:49 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stefan Cars wrote: > Hi! > > If I need to init some DB and stuff in each page, what is the most > efficient way todo that ? Using Execute or do's ? > do will always recompile your Perl code, while Execute will only when the code changes. If the code never changes you can also use require. In case you use require you should place your code in a separate package to avoid namespace problems. Execute has a little bit more overhead on the first run, but will be faster on the following invocations. require is even faster, because it does not test if the source file has changed. Gerald --------------------------------------------------------------------------- Gerald Richter ecos electronic communication services gmbh IT-Securityl�sungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: richter@ecos.de Voice: +49 6133 939-122 WWW: http://www.ecos.de/ Fax: +49 6133 939-333 --------------------------------------------------------------------------- Besuchen Sie uns auf der KOMCOM 2004 in Mannheim 25. bis 27. Mai 2004 Stand K11a www.komcom.de ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info --------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org