I'm also confused about the documentation for PerlRequire.  It say's that
files loaded via PerlRequire are compiled only once, but my startup.pl file
is definitly being compiled twice.  Maybe there is something else in my
config that would cause it?  Or am I misunderstanding something?

Chris

----- Original Message ----- 
From: "Chris Ochs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 12:57 PM
Subject: reading from STDIN on startup


>
> this is apache 1.3.29/mod_perl 1.28
>
> I use connect_on_init for database connections, and I want to read the
> password from STDIN instead of putting the password into the startup.pl
> file.  I was reading that apache initializes the modules twice when it
> starts up, but I'm confused by the behavior I am getting with the
following
> code.  It appears to run twice, with the first run setting $my::dbpass
fine,
> and on the second it contains nothing.   I can't see how to get
$my::dbpass
> to persist through the second init.  Any ideas on how to do this?
>
> Chris
>
> $my::dbpass = <STDIN> unless defined $my::dbpass;
> chop $my::dbpass;
>
> # for testing purposes
>    open(OUT, ">>/tmp/db");
>    print OUT "$my::dbpass";
>    close OUT;
>
>
>
>
>
>
>
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>
>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to