perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Cars <ste...@snowfall.se>
Subject Re: Execute or do ?
Date Mon, 24 May 2004 11:56:30 GMT
Ok! THanks for that. Would there be any advantage performance-wise in
placing alot of code in a perl-module instead of requiring it ? It looks
nicer and all that in a module, but performancee ?

Kind Regards,
Stefan Cars


On Mon, 24 May 2004, Gerald Richter wrote:

> 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
> ---------------------------------------------------------------------------
>

--
Stefan Cars
Snowfall Communications
Tel: +46 (0)18 430 80 50 - Direct: +46 (0)18 430 80 51
Mobile: +46 (0)708 44 36 00 - Fax: +46 (0)708 44 36 04



______________________________________________________________________
SNOWFALL DISCLAIMER:
The information contained in this email and in any
attachments is confidential and may be privileged. If you are not the
intended recipient, please destroy this message and notify the sender
immediately. You should not retain, copy or use this email for any
purpose, nor disclose all or any part of its content to any other person.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Snowfall Communications.

Snowfall Communications monitors the content of emails sent and received
via its network for unauthorised use and for other lawful business
purposes. The contents of an attachment to this email may contain viruses
which could damage your computer system. While Snowfall Communications has
taken every reasonable precaution to minimise this risk, we cannot accept
liability for any damage which you sustain as a result of software
viruses. You should carry out your own virus checks before opening the
attachment.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message