perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Piesk <>
Subject problem with cache ?
Date Sun, 05 Mar 2000 20:09:30 GMT

after solving the problem with apachedbi (thanks edmund), i've
encountered another. i'm porting a site from asp to php/perl in order
to compare the different scripting languages.

ok, here's my problem:

i use a site-wide includefile. let's suppose it's name is
the contents are

sub commonheader{ print... };
sub commonfooter{ print ... };
sub frameheader{ print ... };
sub framefooter{ print ... };

ok, now i have written 2 scripts, (the startpage) and (the navigation bar page).

content of

use strict;
require "";
frameheader( "Startpage");
# some blabla

content of

use strict;
require "";
commonheader( "Navbar");
# some blabla
commonfooter(); creates a frameset with as a member. therefor will be executed first and then so should it be.
but all i get is a "server made a booboo".

here's the error message:

[Sun Mar  5 20:17:14 2000] [error] Undefined subroutine
&Apache::ROOT::testsite_2eperl::default_2epl::commonheader called at
/var/httpd/html/testsite/ line 7.

for testing i created 2 scripts. both include one calls
commonheader(), and the other frameheader(). if i execute the
commonheader-script first i got an error message "undefined sub
frameheader" when executing the frameheader script. and vice versa.

if i change the "require" into "do" it works but i get
everytime i call a sub the message "sub <blabla> redefined at
line ??". 

what can i do against this behaviour ? or made i something completely
wrong ?

ciao -ap

p.s.: sorry if this is trivial but i haven't found an explanation in
my perl docs.
 Andreas Piesk
 pgp fingerprint: 23CB A7E2 2E53 373C  DBCD 8EFC 7777 61C1

What goes up, must come down. Ask any system administrator.

View raw message