On Monday 14 May 2007 12:48 pm, Jonathan Swartz wrote: > That is interesting. Could you try inlining $m->redirect as well, > taking the code from ApacheHandler.pm line 212 or so, then seeing if > you can remove a line and make things work as you did with #3?
Well, I'm making some progress, but I'm definitely in over my head with the OO stuff. :-) I've drilled down a few levels, inlining one function at a time and commenting stuff out: My Component calls $m->redirect() HTML::Mason::ApacheHandler->redirect calls clear_and_abort() HTML::Mason::Request->clear_and_abort() calls abort() HTML::Mason::Request->abort calls throw() HTML::Mason::Exception::Abort->throw calls SUPER::throw() HTML::Mason::Exception->throw calls SUPER::throw() Now we're in Exception::Class::Base->throw(), and the error is still there. My head is starting to spin from following the inheritance path. I don't quite understand how E::C::B->throw is supposed to work, but I put some debugging statements in there and got some more clues. For your convenience, here's the function with my extra prints to STDERR: package Exception::Class::Base; sub throw { my $proto = shift; print STDERR "Exception::Class::Base->throw called with proto=$proto\n"; $proto->rethrow if ref $proto; print STDERR "calling die($proto->new(",join(', ',@_),"))\n\n"; die $proto->new(@_); } Here's what comes out (with a little reformatting for readability): Exception::Class::Base->throw called with proto=Exception::Class::Base call die(Exception::Class::Base->new( aborted_value => 302, error => 'Request->abort was called')) Exception::Class::Base->throw called with proto=HTML::Mason::Exception call die(HTML::Mason::Exception->new(error => q[ Operation `.': no method found, left argument in overloaded package Class::DBI::Object::Has::Been::Deleted, right argument has no overloaded magic at /usr/local/share/perl/5.8.7/Devel/StackTrace.pm line 122, <DATA> line 315. ] )) Voila! (I think) There's the abort(302), then after that, there's another exception. The invalidated CDBI object (now of fake class "Class::DBI::Object::Has::Been::Deleted") is in there causing problems for StackTrace. But why? My understanding breaks down completely at this point since I don't really get E::C::B. Should die() really be getting called? How did my component data get all the way in there? Is die() trying to dump the whole $m object, which I assume contains my (now invalid) object? Confused but intrigued, Charlie -- Charlie Katz Harvard-Smithsonian Center for Astrophysics [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users