Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sporadisch Probleme mit mod_perl

0 views
Skip to first unread message

Michel Bretschneider

unread,
Apr 7, 2009, 12:34:54 PM4/7/09
to
Moin,

Ich frag mal hier in die Runde weil es zu mod_perl scheinbar keine NG
gibt und sich hier wohl einige damit auskennen.
Mein Problem mit mod_perl ist etwas komisch. Nach dem direkt dem Reload
des Apachen und manchmal auch mitten im Betrieb bekomme ich einen
Internal Server Error beim Aufruf der Seite:
[Tue Apr 07 17:48:57 2009] [error] [client 192.168.1.121] failed to
resolve handler `App::Frontend': Bareword "Apache2::Const::OK" not
allowed while "strict subs" in use at /srv/www/perl-lib/App/Frontend.pm
line 33.\nBareword "Apache2::Const::AUTH_REQUIRED" not allowed while
"strict subs" in use at /srv/www/perl-lib/App/Frontend.pm line
33.\nCompilation failed in require at (eval 3) line 3.\n

Warum geht das manchmal schief?

Das komische ist, daß es meistens durchaus gut geht. Der Code für die
Seite ist recht einfach (siehe unten).

Gruß

Michel

PS: ich hab mich eng an
http://perl.apache.org/docs/2.0/user/intro/start_fast.html gehalten

--

#App/Frontend.pm
package App::Frontend;
use strict;
use warnings;

# haessliche Weiche fuer Eclipse/EPIC+ActiveState10x ohne Apache
BEGIN {
if ( $^O =~ /MSWin32/i ) {
print "No Apache configured\n";
exit 0;
}
}
use Apache2::RequestRec ();
use Apache2::RequestIO ();
#use Apache2::Const -compile => qw( ok );
sub handler {
my $r = shift;
$r->content_type('text/plain');
print "This App is coming soon\n";
return Apache2::Const::OK;
}

1;

Michel Bretschneider

unread,
Apr 7, 2009, 4:00:12 PM4/7/09
to
das Problem war, dass

#use Apache2::Const -compile => qw( ok );
ich damit gar kein Ergebnis bekam und es deswegen auskommentiert hatte

Richtig muss es natuerlich heissen:
use Apache2::Const -compile => qw( OK );

Gruss

Michel

0 new messages