Hi there,

On Mon, 17 Nov 2003 [EMAIL PROTECTED] wrote:

> I've encountered a weird, intermittent problem.  I have a Perl handler
> that handles a certain URL.  Sometimes it will fail because the $r
> passed to it loses its class.

Your explanation of the problem hasn't convinced me - I've never heard of
such a thing happening - but I suppose there's a first time for everything.

> The handler starts with:
> 
> sub handler {
>     use strict;
>     my $r = shift;
>     my $rclass1 = ref $r;
> 
> Then, further down:
> 
>     my $rclass = ref $r;
>     if($rclass ne 'Apache') {
>         print STDERR "Transaction2: rclass1='$rclass1'  rclass='$rclass'  r=" . 
> Dumper($r);
>     }
> 
> I captured it twice to see where it changes - looks like it's messed up
> from the start of the function.

What happens if you just say

print STDERR "\$r = [$r]\n";

after the assignment to $r?

> Here's what I see in the error log when the problem occurs.  The second
> error is caused by invoking $r->header_in.
> 
> 
> Transaction2: rclass1=''  rclass=''  r=$VAR1 = 'PrintMe::Transaction2';
> [Thu Nov 13 21:04:55 2003] [error] Can't locate object method "header_in" via 
> package "PrintMe::Transaction2" (perhaps you forgot to load 
> "PrintMe::Transaction2"?) at /home/www/www/Libs/PrintMe/Transaction2.pm line 35.

I see only one error here.  What's on line 35?

73,
Ged.


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

Reply via email to