Marc D. Spencer wrote:
>>
>
> Then poof:
> 
> [Wed Sep 25 08:45:06 2002] [error] [asp] [25007] [error] Can't call 
> method "CompileInclude" on an undefined value at 
> /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP/Response.pm line 790. 
> <--> , /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1434
> Use of uninitialized value.
> 
> Then I restarted, to bring things happy again:
> 

Try to see where the call is made to response in your code,
and provide a stack trace after setting

   $SIG{__DIE__} = \&Carp::confess

A bit of code from where the $Response object is getting used
would be good too.

The Response object is in an invalid state.  One problem that can
occur is when objects are referenced out of scope like this:

# global.asa, will have error on future $Response use
sub my::tag {
   $Response->Include('tag.inc');
}

This will likely have a my closure problem in that
when the sub is defined, the $Response object may be defined
in the GlobalPackage, so that is cached in the my::tag
sub routine definition.  After that $Response object is
DESTROYED, future uses of it will error like what you report.

To do the above without error, you can do things like:

# global.asa
sub my::tag {
   $main::Response->Include('tag.inc');
}

If you reference the Response object explicitly in the main
package, you will always get the current object, and you do
not have any my() scoping issues to deal with.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to