Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Apache::Registry - shared variable?

by tqisjim (Beadle)
on Jun 20, 2013 at 17:16 UTC ( #1040004=note: print w/replies, xml ) Need Help??


in reply to Re: Apache::Registry - shared variable?
in thread Apache::Registry - shared variable?

Also, one of Apache::Registry's shortcomings was a confusing and somewhat incomplete approach to sharing variables among sessions. Since the code is cached, the variables aren't automatically re-initialized each time the script is run. This might solve your problem:

my $foo ; ## usually ok in perl my $foo = undef ; ## an Apache::Registry requirement?

If you're not committed to Apache::Registry. Consider an alternative. Also, the mod_perl mailing list: http://perl.apache.org

Replies are listed 'Best First'.
Re^3: Apache::Registry - shared variable?
by DaisyLou (Acolyte) on Jun 20, 2013 at 20:32 UTC
    Oh, and to answer your other question...
    $VAR1 = { 'MOD_PERL_API_VERSION' => 2, 'MOD_PERL' => 'mod_perl/2.0.4' };

    In Apache config, though:

    PerlResponseHandler ModPerl::Registry

    Our code is "not mod_perl safe", so we were told to use Registry to work around that.

      Our code is "not mod_perl safe", so we were told to use Registry to work around that.

      Yup, Registry is used to run .cgi's under mod_perl but isn't a cure-all, it won't magically make sure you're using CGI.pm correctly or that you're Coping with Scoping -- see (this which you probably already saw) for some issue CGI to mod_perl Porting. mod_perl Coding guidelines and tweak your code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040004]
help
Chatterbox?
[davies]: There is an option (I have it set) to force preview before submission. Perhaps your option has been set (accidentally?) and you are not expecting it.
[ambrus]: sorry, I mean at least two words for the title and then preview
[ambrus]: davies: that option is the default. and it's not really "force", it just hides the button.
[marto]: yes, not reading the errors displayed has been a cause of this type of report in the past
[nysus]: Ambrus, ah. I think that was the problem. I'll try. Thanks!
[davies]: Ambrus: you've missed it by a couple of weeks, but consider next year's London Perl Workshop.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-12-15 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?