On Tuesday 13 April 2004 5:53 pm, MJH wrote:

> turned up anything)? Other than stripping everything down to make a
> minimalist test case (which is what I'm working on at the moment), is there
> anything else I can do to try and track what's happening?

The results of which give me the following test case (which fails under 
mod_perl but not perl):

test.pl:
#!/usr/bin/perl

use strict;
use test;
my $session = new tmaxx::test;
warn "complete";

test.pm:
#!/usr/bin/perl

package test;

use strict;

sub new
{
    my $class   = shift;  # class is always the first parameter
    my $this    = {};
    bless $this;
    undefinedfunction();
    return $this;
}
sub DESTROY
{
    my     $r     = Apache->request;
    $r->rflush(); 
}
1;



If you move "undefinedfunction();" up one line (to above the bless), then you 
get the error "ModPerl::Registry: Undefined subroutine 
&test::undefinedfunction..." otherwise you just get silence (the warn 
"complete" is never called).
If you remove the call to $r->rflush() then you also get the error (despite 
the fact that the DESTROY method is not called by that point. 
So it looks like some sort of compile time error.

Anything else I can try?


(The rflush is there because the app I'm working on tracks 
per-user/per-session bandwidth and the cleanup phase writes this to a 
database. To get the correct stats the data needs to have actually been sent. 
This is probably irrelevant).

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to