[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] (Fwd) Re: [cgiapp] Shared class attributes under mod_perl


Hi,

I am curious. How global is global? I mean for example I will use a db
handle in a module as global with use vars qw($dbh); but the rest is use
strict. The module is a class module with bless and please and thankyou. 

Is this still the kind of thing to big time avoid? So if I run this code
without Apache::DBI I end up with extra db connections, not really very
pretty. But I never thought it would be a big problem. 

Any thoughts?

Thanks,


Eric 

At 12:40 PM 10/2/02 -0400, William McKee wrote:
>In case anyone is thinking of trying to understand my last two posts to 
>the list regarding the troubles I've been having with mod_perl and 
>CGI::App, I have solved my problem.
>
>The root of all evils in mod_perl scripts are global variables. There was 
>a subroutine I used to load the config file which required an external 
>file into memory. Both my configuration files used the same global hash 
>name which would occassionally get changed when the other script ran. I 
>can go into more detail if anyone is interested, but the major problem was 
>global variables.
>
>The perl-status pages has been a great resource for helping me track down
>and debug this problem. See
><http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debu
>gging> for more info on setting this up.
>
>Later,
>William
>
>-- 
> Lead Developer
> Knowmad Services Inc. || Internet Applications & Database Integration
> http://www.knowmad.com
> 
>
>
>---------------------------------------------------------------------
>Web Archive:  http://www.mail-archive.com/suppressed/
>To unsubscribe, e-mail: suppressed
>For additional commands, e-mail: suppressed
>

http://www.kwinternet.com/eric
(250) 655 - 9513 (PST Time Zone)

"Inquiry is fatal to certainty." -- Will Durant 





---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.