- Changed how we compose traits onto the response, request, and stats class so
that we compose just once at setup time (performance optimization). Also added
a debug screen at startup to display composed classes to help with debugging.
+ - Fixed a regressed caused by the changes we made to the way ->state works so that
+ now when you forward to an action and that action throws and exception, $c->state
+ is set to 0, instead of the value of the exeption (this is to be as indicated by
+ the documentation).
5.90104 - 2016-04-04
- Merged pull request #131, fix for noisy debug logs when used type constraints
sub forward {
my $self = shift;
no warnings 'recursion';
- $self->_do_forward(forward => @_);
+ return $self->_do_forward(forward => @_);
}
sub _do_forward {
no warnings 'recursion';
$action->dispatch( $c );
+ #If there is an error, all bets off regarding state. Documentation
+ #Specifies that when you forward, if there's an error you must expect
+ #state to be 0.
+ if( @{ $c->error }) {
+ $c->state(0);
+ }
return $c->state;
}