[Cologne-pm] Include

jschulz.cpan jschulz.cpan at bloonix.de
Wed Jun 6 02:48:12 PDT 2007


> > Gibt es da eine effektive Lösung?

Ja.

-----------------------------
use strict;
use warnings;
use lib '../lib';
use Foo::WWW::Main;
use CGI::Fast;

my $foo = Foo::WWW::Main->new();

while (my $cgi = new CGI::Fast) {
   eval { $foo->run($cgi) };
   print STDERR $@ if $@;
}
-----------------------------

Alles Weitere erledigt Foo::WWW::Main, der "Dispatcher" - wenn
man es so nennen möchte. Dann bindest du alle notwendigen Module
schon zum Start ein und hast jedesmal die Kompilierzeit gesparrt.
Frameworks sind super toll, aber die Kompilierzeit steigt immens 
in die Höhe je nach Anzahl der Einbindungen.

Cheers



More information about the Cologne-pm mailing list