Stefan Cars wrote:
> 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 ?
>

There is no performance difference between a module and a require, actually
a Perl Module is loaded via require (use is require + calling import).

BTW. You might also want to take a look at Embperl application object

Gerald



> 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:     [EMAIL PROTECTED]          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
>> -------------------------------------------------------------------------
--

---------------------------------------------------------------------------
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:     [EMAIL PROTECTED]          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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to