Hello,

r>I have the following situation... it is not big issue but
r>i'm interested why this happen...
r>
r>    my $ID = 555;
r>    sub blah {
r>        ...
r>        $ID =  selectrow query;
r>        ...
r>    }

This is, in fact, a big issue. You should see a message in your error log
"shared variable $ID will not stay shared." You should not use a my
variable defined at the top level of your Apache::Registry script in a
subroutine. See this entry in the mod_perl guide:

    http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S

The workaround is to make $ID a package global (use vars qw($ID)).

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       [EMAIL PROTECTED]
Engineer                   [EMAIL PROTECTED]          Voice 650-930-9062
Tellme Networks, Inc.       1-800-555-TELL            Fax 650-930-9101
----------------------------------------------------------------------

Reply via email to