On Fri, Jun 13, 2008 at 2:53 PM, Michael Peters <[EMAIL PROTECTED]> wrote:
> Doing a "$q = new CGI" means that you will get a new CGI object on every
> request, which is what you want. I've never used the function interface of
> CGI.pm like you did in your example so I don't know how CGI.pm handles
($dept2show) = $q->param('deptLtr') =~ /^([a-zA-Z]{1})$/;
}
-Original Message-
From: Dondi Stroma [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 4:38 PM
To: Brian Gaber
Cc: modperl@perl.apache.org
Subject: Re: CGI.pm param and mod_perl
Brian Gaber wrote:
> Th
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 4:38 PM
To: Brian Gaber
Cc: modperl@perl.apache.org
Subject: Re: CGI.pm param and mod_perl
Brian Gaber wrote:
> The HTML code that I am selecting looks like this:
That's not necessary. What does your perl code look like now? Also, tr
Brian Gaber wrote:
The HTML code that I am selecting looks like this:
That's not necessary. What does your perl code look like now? Also, try
printing/warning the value of $$, which is the process ID. I think you'll
find that the value of your variable stays the same for each process.
s O <- ERROR I selected C
The value of set is 0
SELECT * FROM atlantic_rr WHERE dept REGEXP '^O' ORDER BY dept, pay_list
-Original Message-
From: Michael Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 4:21 PM
To: Brian Gaber
Cc: Dondi Stroma; modperl@perl.apac
Brian Gaber wrote:
> Here is the log you asked for:
We need a little more context than that. For instance I don't see where it
actually has the fatal error you mentioned from the earlier posts. Also, if you
could annotate it with what the values of those params "should" be.
But the most im
om: Michael Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 3:47 PM
To: Dondi Stroma
Cc: modperl@perl.apache.org
Subject: Re: CGI.pm param and mod_perl
Dondi Stroma wrote:
> I don't see what is so bad about this:
>
> use vars qw($q);
> $q = CGI->new();
>
>
lue of region is Atlantic
The value of deptLtr is O <- ERROR I selected C
The value of set is 0
SELECT * FROM atlantic_rr WHERE dept REGEXP '^O' ORDER BY dept, pay_list
Thanks.
-Original Message-
From: Michael Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2
Dondi Stroma wrote:
> I don't see what is so bad about this:
>
> use vars qw($q);
> $q = CGI->new();
>
> Even though it's a global variable, you are assigning it a new value,
> CGI->new, each time.
You're right. I don't normally think about registry scripts since I almost never
use them. I was
Brian Gaber wrote:
> When I read the mod_perl docs they suggest that use vars was one
> approach to fix the "Variable X will not stay shared at" error.
This makes me think that maybe your problem is something else... but try below.
> What is the recommended approach? Pass a reference to $q?
No
Michael Peters wrote:
Brian Gaber wrote:
Using $q was not successful.
That's because you ignored my advice :)
Here is what I have done:
use vars qw($q);
That makes $q a global. Bad, bad, very bad. Slap yourself on the wrist.
Remove
that "use vars" line.
I don't see what is so bad abou
ared at" error.
What is the recommended approach? Pass a reference to $q?
Thanks
-Original Message-
From: Michael Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 3:21 PM
To: Brian Gaber
Cc: modperl@perl.apache.org
Subject: Re: CGI.pm param and mod_perl
Brian Gaber wro
Brian Gaber wrote:
> Using $q was not successful.
That's because you ignored my advice :)
> Here is what I have done:
>
> use vars qw($q);
That makes $q a global. Bad, bad, very bad. Slap yourself on the wrist. Remove
that "use vars" line.
> $q = CGI->new();
Now replace that with
my $q =
}
I am running this script simultaneously on two PCs. Sometimes
$dept2show has the expected value, but often is has the an old value.
-Original Message-
From: Michael Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2008 2:54 PM
To: Brian Gaber
Cc: modperl@perl.apache.org
Brian Gaber wrote:
> One thought, my code is written to use the CGI.pm
> default object so that I do not have something like $q = new CGI; Could
> this be the cuase?
Very well could be.
Doing a "$q = new CGI" means that you will get a new CGI object on every
request, which is what you want. I'v
I have converted a CGI.pm cgi-bin script to run in mod_perl as a
Registry. On multiple runs I seem to get old values of a param('var').
I have read the documents and understand I need to be careful with
global variables. Is there something I need to be aware of when I use
CGI.pm params? One thou
16 matches
Mail list logo