The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Response - the response

SYNOPSIS

   # ... official way to get a Response object ...
   use App;
   $context = App->context();
   $response = $context->response();  # get the response

   # ... alternative way (used internally) ...
   use App::Response;
   $response = App::Response->new();

DESCRIPTION

A Response class ...

Class Group: Response

The following classes might be a part of the Response Class Group.

  • Class: App::Response

  • Class: App::Response::CGI

Constructor Methods:

new()

The App::Response->new() method is rarely called directly. That is because the current response is usually accessed through the $context object.

    * Signature: $response = App::Response->new(%named);
    * Return: $response     App::Response
    * Throws: App::Exception
    * Since:  0.01

    Sample Usage: 

    $response = App::Response->new();

Protected Methods:

The following methods are intended to be called by subclasses of the current class (or environmental, "main" code).

_init()

The _init() method is called from within the standard Response constructor. The _init() method in this class does nothing. It allows subclasses of the Response to customize the behavior of the constructor by overriding the _init() method.

    * Signature: $response->_init()
    * Param:     void
    * Return:    void
    * Throws:    App::Exception
    * Since:     0.01

    Sample Usage: 

    $response->_init();

Public Methods

content_type()

The content_type() method ...

    * Signature: $content_type = $response->content_type();
    * Signature: $response->content_type($content_type);
    * Param:  $content_type         string
    * Return: $content_type         string
    * Throws: <none>
    * Since:  0.01

    Sample Usage: 

    $content_type = $response->content_type();

content()

The content() method ...

    * Signature: $content = $response->content();
    * Signature: $response->content($content);
    * Param:  $content         any
    * Return: $content         any
    * Throws: <none>
    * Since:  0.01

    Sample Usage: 

    $content = $response->content();