+ if ( $applicable == OK ) {
+ eval { $r->model_class->process($r) };
+ if ( my $error = $@ ) {
+ $status = $r->call_exception($error);
+ if ( $status != OK ) {
+ warn "caught model error: $error";
+ return $r->debug ? $r->view_object->error( $r, $error ) : ERROR;
+ }
+ }
+ }
+ if ( !$r->{output} ) { # You might want to do it yourself
+ eval { $status = $r->view_object->process($r) };
+ if ( my $error = $@ ) {
+ $status = $r->call_exception($error);
+ if ( $status != OK ) {
+ warn "caught view error: $error";
+ return $r->debug ? $r->view_object->error( $r, $error ) : ERROR;
+ }
+ }
+ return $status;