Name

pkit_status_code — Get or set the status code for you page.

Synopsis

  # get status code
  my $status_code = $model->pkit_status_code;

  # set status code
  $model->pkit_status_code(DONE);
  $model->pkit_status_code(NOT_FOUND);
  $model->pkit_status_code(OK);

  # return old status code
  return $model->pkit_status_code(OK);

  # remove previously set returncode
  $model->pkit_status_code(undef);
     

Description

Set or get the status code for your page. If you set a status code the execution of your model code ends after the peace of code that sets the status code. Even if you set the status code to OK. The status code is passed back to the webserver.