Thread speed-up trotz module: ... (17 answers)
Opened by esskar at 2003-11-10 01:35

esskar
 2003-11-10 12:34
#48389 #48389
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
okay... wollte das mit require mal versuchen

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
my %Actions = (
login => {
libs => [
"Sources::Env",
"Sources::Global",
"Sources::Authenticate",
],
subs => [
\&Sources::Env::global_set,
\&Sources::Global::write_standardhttp_header,
\&Sources::Authenticate::write_loginmask,
],
},
);

sub handler
{
my ($obj) = @_;
my $action = lc($obj->{CGI}->getparam('action')) || 'login';

unless(exists $Actions{$action}->{subs}) { $action = 'login'; }

foreach my $lib (@{$Actions{$action}->{libs}})
{
require $lib;
}

foreach my $proc (@{$Actions{$action}->{subs}})
{
unless($proc->($obj))
{
# error in sub
last; # errorhandling
}
}
}


leider meint er jetzt:

Can't locate Sources::Env in @INC (@INC contains: F:/Perl/lib F:/Perl/site/lib .) at F:\ams\sentinel\www\email\mailgate.pl line 235

wobei 235 die Zeile

require $lib;

ist...


Es wundert mich, dass er sie einmal findet und einmal nicht!
Hints?

View full thread speed-up trotz module: ...