bug with subrequests and MasonX::Request::WAS

Jonathan Swartz <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
The big check-in triggered a bug in MasonX::Request::WithApacheSession 
and subrequests. Its new() method looks like:

sub new
{
     my $class = shift;

     $class->alter_superclass( $HTML::Mason::ApacheHandler::VERSION ?
                               'HTML::Mason::Request::ApacheHandler' :
                               $HTML::Mason::CGIHandler::VERSION ?
                               'HTML::Mason::Request::CGI' :
                               'HTML::Mason::Request' );

     my $self = $class->SUPER::new(@_);

     return if $self->is_subrequest;

That last line is incorrectly returning undef. I think you want "return 
$self".

The reason this never came up before is because in the stable branch, we 
only set parent_request (which is_subrequest checks) after the request 
is created. In HEAD, parent_request is part of the params to the request 
constructor, so is_subrequest will be true.

Actually this bug would be triggered currently with a 
subrequest-inside-a-subrequest-inside-a-request. :)

So we'll need to fix this before releasing 1.3.

Jon



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.