You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Andrey A. Kudrin" <ku...@russiancourier.com> on 2003/11/10 20:12:32 UTC

Re[4]: strange behavor

Hello Perrin,

Friday, November 07, 2003, 12:23:59 AM, you wrote:

PH> There is nothing in your sample code here that would cause one sub to be
PH> called in place of another.  How do you know that the other print_login
PH> is being called?

Because I see the result page. All print_login prints different pages.

PH> Is it because of CGI parameters that get printed?  You
PH> might be having a problem with accidentally caching your CGI object
PH> somewhere.

but why it's cached under PerlRun?

PH> Can you show us the print_login subs?

there is nothing extraordinary, just few prints and nothing else.

-------------------------------------------
Sincerely yours,
Andrey A. Kudrin,
RussianCourier, http://www.russiancourier.com
mailto:kudrin@russiancourier.com



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Re[4]: strange behavor

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2003-11-10 at 14:12, Andrey A. Kudrin wrote:
> PH> There is nothing in your sample code here that would cause one sub to be
> PH> called in place of another.  How do you know that the other print_login
> PH> is being called?
> 
> Because I see the result page. All print_login prints different pages.

Does the output you send depend on something external, like a parameter
from CGI.pm?

> PH> Is it because of CGI parameters that get printed?  You
> PH> might be having a problem with accidentally caching your CGI object
> PH> somewhere.
> 
> but why it's cached under PerlRun?

You could be accidentally creating a closure.  Also, keep in mind that
PerlRun only clears globals within the main script.  If you use any
modules that have globals in their own namespaces, those do not get
cleared by PerlRun.

> PH> Can you show us the print_login subs?
> 
> there is nothing extraordinary, just few prints and nothing else.

Well, the code you've shown so far doesn't seem like it could produce
the results you're talking about, so we really need you to show us a
test case to give you further help.  If you can reduce your script down
to a very simple one that demonstrates the problem and post it here, we
can probably see what's wrong.

- Perrin

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: strange behavor

Posted by Stas Bekman <st...@stason.org>.
Andrey A. Kudrin wrote:
> Hello Perrin,
> 
> Friday, November 07, 2003, 12:23:59 AM, you wrote:
> 
> PH> There is nothing in your sample code here that would cause one sub to be
> PH> called in place of another.  How do you know that the other print_login
> PH> is being called?
> 
> Because I see the result page. All print_login prints different pages.

Can you come up with two simple test scripts that you can reproduce the 
problem with? We fail to guess a possible reason for this behavior. We need to 
be able to reproduce the problem to analyze it.

> PH> Is it because of CGI parameters that get printed?  You
> PH> might be having a problem with accidentally caching your CGI object
> PH> somewhere.
> 
> but why it's cached under PerlRun?

PerlRun doesn't cache scripts it compiles at all. Registry does.

> PH> Can you show us the print_login subs?
> 
> there is nothing extraordinary, just few prints and nothing else.

see above.

 > But how can I emulate on-line activity? This error occurs only
 > on-line.

You don't need to emulate it. Just run it online. You can use Apache::Test to 
setup a test if you really want to. But if you give us 2 scripts and the 
instructions how to reproduce the problem we will do that. (e.g., request 
script 1 once and then script 2, and then ...).

Also try to reproduce the problem while running under 'httpd -X'.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html