Hi!
I should migrate Perl-CGIs to mod_perl for performance reasons.
We use many subroutines in our CGIs, which read and write
global (my-defined) variables. Our plain subroutines are not nested,
but they are when the mod_perl wrapper is put around them at execution time.
In this special case, some values are not updated. You get this error:
Variable "$" will not stay shared at line
(#1)
This problem is also discribed under:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S
This page says to convert all subroutines to "anonymous" subroutines.
This works fine, as long as anonymous subroutines call other anonymous
subs defined before. Ok, now you can order all subroutines, so that they are
always
defined before they are called.
QUESTION: But how should I transform the script, if the anonymous subs call
each other?
I get always the following error:
Undefined soubroutine &main:: called at line .
I don't know how to solve this. Is there any solution for this? Can I make
any prototype defs for such subroutines?
BIG THANKS IN ADVANCE,
Christoph.
yLine Internet Services AG