1OpenFrame::Response(3)User Contributed Perl DocumentationOpenFrame::Response(3)
2
3
4

NAME

6       OpenFrame::Response - An abstract response class
7

SYNOPSIS

9         use OpenFrame;
10         use OpenFrame::Constants;
11         my $r = OpenFrame::Response->new();
12         $r->message("<html><body>Hello world!</body></html>");
13         $r->mimetype('text/html');
14         $r->code(ofOK);
15         $r->cookies(OpenFrame::Cookies->new());
16

DESCRIPTION

18       "OpenFrame::Response" represents responses inside OpenFrame. Responses
19       represent some kind of response following a request for information.
20
21       This module abstracts the way clients can respond with data from Open‐
22       Frame.
23

METHODS

25       new()
26
27       This method creates a new "OpenFrame::Response" object. It takes no
28       parameters.
29
30       cookies()
31
32       This method gets and sets the "OpenFrame::Cookietin" that is associated
33       with this response.
34
35         my $cookietin = $r->cookies();
36         $r->cookies(OpenFrame::Cookies->new());
37
38       message()
39
40       This method gets and sets the message string associated with this
41       response.  A scalar reference can be stored. It will always be returned
42       as a scalar.
43
44         my $message = $r->message();
45         $r->message("<html><body>Hello world!</body></html>");
46
47       code()
48
49       This method gets and sets the message code associated with this
50       response. The following message codes are exported when you use "Open‐
51       Frame::Constants": ofOK, ofERROR, ofREDIRECT, ofDECLINE.
52
53         my $code = $r->code();
54         $r->code(ofOK);
55
56       mimetype()
57
58       This method gets and sets the MIME type associated with this response.
59
60         my $type = $r->mimetype();
61         $r->mimetype('text/html');
62

AUTHOR

64       James Duncan <jduncan@fotango.com>
65
66
67
68perl v5.8.8                       2004-08-05            OpenFrame::Response(3)
Impressum