On Sat, 14 Feb 2009, Patrick Galbraith wrote:
> Thanks - as soon as I read what you said, I looked at the
> code and saw I instantiated a CGI object at the top of the
> script, package-scoped so I wouldn't have to pass it
> between subroutines. I thought I would test this intuition
> by instantia
In the code you showed, nothing calls sub1, so I wasn't sure what you
were thinking would happen there. If your real code does call it
first on every request, then it should work.
There's no need to worry about concurrency. Even when using threads,
each interpreter is separate and nothing is sha
Sorry, this list does not automatically set the reply-to, and I always
forget..
Perrin Harkins wrote:
On Sat, Feb 14, 2009 at 5:50 AM, André Warnier wrote:
Less nice, less neat, less classic, terrible style, whatever you want, but
which also works :
Yeah, I wouldn't really recommend this.
On Sat, Feb 14, 2009 at 5:50 AM, André Warnier wrote:
> Less nice, less neat, less classic, terrible style, whatever you want, but
> which also works :
Yeah, I wouldn't really recommend this. Passing your $cgi object to
subs that need it is the best solution.
> I am not quite sure why it works,
Patrick Galbraith wrote:
[...]
Hi.
Less nice, less neat, less classic, terrible style, whatever you want,
but which also works :
# my nifty cgi-bin
use strict;
use warnings;
{
package MyOwn;
no strict;
$CGI = '';
}
sub sub1 {
$MyOwn::CGI = new CGI();
}
sub sub2 {
my $name = $MyOwn::CG
Perrin,
Thanks - as soon as I read what you said, I looked at the code and saw I
instantiated a CGI object at the top of the script, package-scoped so I
wouldn't have to pass it between subroutines. I thought I would test
this intuition by instantiating in the method that needed it, and pass
On Tue, Feb 10, 2009 at 10:44 PM, Patrick Galbraith wrote:
> After looking at it in gdb, I noticed it has something to do with
> Apache2::RequestRec, the header in particular.
My guess is that you're keeping an old CGI or $r object around between
requests, or that this is some kind of special sce
Hello all,
I'm writing about the benefits of mod_perl in my book, having taken a
CGI script and using ModPerl::Registry turning it into a mod_perl app...
so on so forth... While testing what I'm writing about, I keep seeing
segfaults in my apache log. I started worrying that I have a bug in
D