Change log for Web::Simple
+ - Provide $app->run_test_request for use in test scripts
- Preserve original env in Web::Dispatch so ParamParser can cache in there
(stops HTTP::Body object getting destroyed early thereby losing uploads)
this file will also act as a class module, so you can save it as HelloWorld.pm
and use it as-is in test scripts or other deployment mechanisms.
+Note that you should retain the ->run_if_script even if your app is a
+module, since this additionally makes it valid as a .psgi file, which can
+be extremely useful during development.
+
For more complex examples and non-CGI deployment, see
L<Web::Simple::Deployment>. To get help with L<Web::Simple>, please connect to
the irc.perl.org IRC network and join #web-simple.
Used for running your application under stand-alone CGI and FCGI modes.
+I should document this more extensively but run_if_script will call it when
+you need it, so don't worry about it too much.
+
+=head2 run_test_request
+
+ my $res = $app->run_test_request(GET => '/');
+
+ my $res = $app->run_test_request(POST => '/' => %form);
+
+ my $res = $app->run_test_request($http_request);
+
+Accepts either an L<HTTP::Request> object or ($method, $path) and runs that
+request against the application, returning an L<HTTP::Response> object.
+
+If the HTTP method is POST or PUT, then a series of pairs can be passed after
+this to create a form style message body. If you need to test an upload, then
+create an L<HTTP::Request> object by hand or use the C<POST> subroutine
+provided by L<HTTP::Request::Common>.
+
=head1 AUTHORS
See L<Web::Simple> for authors.