From 46138d3c576d67397b41ddf4ca22aefae0d02af3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 22 Jul 2012 18:17:06 -0500 Subject: more docs --- lib/Web/Request.pm | 17 +++++++++++++++++ lib/Web/Request/Upload.pm | 5 +++++ lib/Web/Response.pm | 9 +++++++++ 3 files changed, 31 insertions(+) (limited to 'lib') diff --git a/lib/Web/Request.pm b/lib/Web/Request.pm index 84174f4..905d1d7 100644 --- a/lib/Web/Request.pm +++ b/lib/Web/Request.pm @@ -22,6 +22,23 @@ use URI::Escape (); =head1 DESCRIPTION +Web::Request is a request class for L applications. It provides access to +all of the information received in a request, generated from the PSGI +environment. The available methods are listed below. + +Note that Web::Request objects are intended to be (almost) entirely read-only - +although some methods (C, C, etc) may return mutable objects, +changing those objects will have no effect on the actual environment, or the +return values of any of the other methods. Doing this is entirely unsupported. +In addition, the return values of most methods that aren't direct accesses to +C are cached, so if you do modify the actual environment hashref, you +should create a new Web::Request object for it. + +The one exception is the C attribute, which is allowed to be +modified. Changing the encoding will change the return value of any subsequent +calls to C, C, C, +C, and C. + =cut has env => ( diff --git a/lib/Web/Request/Upload.pm b/lib/Web/Request/Upload.pm index 674ab8d..b454aec 100644 --- a/lib/Web/Request/Upload.pm +++ b/lib/Web/Request/Upload.pm @@ -18,6 +18,11 @@ use Web::Request::Types; =head1 DESCRIPTION +This class represents a single uploaded file, generally from an C<< >> element. You most likely don't want to create instances of +this class yourself; they will be created for you via the C method on +L. + =cut has headers => ( diff --git a/lib/Web/Response.pm b/lib/Web/Response.pm index 5ee5387..bc82526 100644 --- a/lib/Web/Response.pm +++ b/lib/Web/Response.pm @@ -21,6 +21,15 @@ use Web::Request::Types (); =head1 DESCRIPTION +Web::Response is a response class for L applications. Generally, you will +want to create instances of this class via C on the request +object, since that allows a framework which subclasses L to also +return an appropriate subclass of Web::Response. + +All attributes on Web::Response objects are writable, and the final state of +them will be used to generate a real L response when C is +called. + =cut has status => ( -- cgit v1.2.3-54-g00ecf