script/myapp_create.pl view Stuff
script/myapp_create.pl controller Yada
- # built in testserver
+ # built in testserver -- use -r to restart automatically on changes
script/myapp_server.pl
# command line interface
use Catalyst;
sub debug { 1 }
-=item -Dispatcher
-
-Force Catalyst to use a specific dispatcher.
-
=item -Engine
Force Catalyst to use a specific engine.
=item $c->action
-Accessor for the current action
+Accessor for the current action. Returns a L<Catalyst::Action> object,
+which stringifies to the action name.
=item $c->comp($name)
=item $c->dispatcher
-Contains the dispatcher instance.
-Stringifies to class.
+Contains the dispatcher instance. Stringifies to class name.
=item $c->forward( $command [, \@arguments ] )
Forward processing to a private action or a method from a class.
If you define a class without method it will default to process().
also takes an optional arrayref containing arguments to be passed
-to the new function. $c->req->args will be reset upon returning
+to the new function. $c->req->args will be restored upon returning
from the function.
$c->forward('/foo');
=item $c->namespace
-Accessor to the namespace of the current action
+Returns the namespace of the current action, i.e., the uri prefix corresponding to the
+controller of the current action.
=item $c->path_to(@path)
=item $c->setup
-Setup.
+Initializes the dispatcher and engine, loads any plugins, and loads the
+model, view, and controller components.
$c->setup;
$c->error('Something bad happened');
-Clean errors.
+Clear errors.
$c->error(0);
=item $c->engine
-Contains the engine instance.
-Stringifies to the class.
+Contains the engine instance. Stringifies to the class name.
=item $c->log
Contains the logging object. Unless it is already set Catalyst sets this up with a
-C<Catalyst::Log> object. To use your own log class:
+L<Catalyst::Log> object. To use your own log class:
$c->log( MyLogger->new );
$c->log->info("now logging with my own logger!");
-Your log class should implement the methods described in the C<Catalyst::Log>
+Your log class should implement the methods described in the L<Catalyst::Log>
man page.
=item $c->plugin( $name, $class, @args )
=item $c->components
-Contains the components.
+Returns a hash of components.
-=item $c->context_class($class)
+=item $c->context_class
-Contains the context class.
+Returns or sets the context class.
=item $c->counter
-Returns a hashref containing coderefs and execution counts.
-(Needed for deep recursion detection)
+Returns a hashref containing coderefs and execution counts (needed for deep recursion detection).
=item $c->depth
-Returns the actual forward depth.
+Returns the number of actions on the current internal execution stack.
=item $c->dispatch
-Dispatch request to actions.
+Dispatches a request to actions.
=cut
sub dispatch { my $c = shift; $c->dispatcher->dispatch( $c, @_ ) }
-=item $c->dispatcher_class($class)
+=item $c->dispatcher_class
-Contains the dispatcher class.
+Returns or sets the dispatcher class.
=item dump_these
[ Request => $c->req ], [ Response => $c->res ], [ Stash => $c->stash ],;
}
-=item $c->engine_class($class)
+=item $c->engine_class
-Contains the engine class.
+Returns or sets the engine class.
=item $c->execute($class, $coderef)
=item $c->finalize
-Finalize request.
+Finalizes the request.
=cut
=item $c->finalize_body
-Finalize body.
+Finalizes body.
=cut
=item $c->finalize_cookies
-Finalize cookies.
+Finalizes cookies.
=cut
=item $c->finalize_error
-Finalize error.
+Finalizes error.
=cut
=item $c->finalize_headers
-Finalize headers.
+Finalizes headers.
=cut
=item $c->finalize_read
-Finalize the input after reading is complete.
+Finalizes the input after reading is complete.
=cut
=item $c->finalize_uploads
-Finalize uploads. Cleans up any temporary files.
+Finalizes uploads. Cleans up any temporary files.
=cut
=item $c->get_action( $action, $namespace )
-Get an action in a given namespace.
+Gets an action in a given namespace.
=cut
=item $c->get_actions( $action, $namespace )
-Get all actions of a given name in a namespace and all base namespaces.
+Gets all actions of a given name in a namespace and all parent namespaces.
=cut
=item handle_request( $class, @arguments )
-Handles the request.
+Called to handle each HTTP request.
=cut
=item $c->prepare(@arguments)
-Turns the engine-specific request( Apache, CGI ... )
-into a Catalyst context .
+Creates a Catalyst context from an engine-specific request (Apache, CGI, etc.).
=cut
=item $c->prepare_action
-Prepare action.
+Prepares action.
=cut
=item $c->prepare_body
-Prepare message body.
+Prepares message body.
=cut
=item $c->prepare_body_chunk( $chunk )
-Prepare a chunk of data before sending it to HTTP::Body.
+Prepares a chunk of data before sending it to L<HTTP::Body>.
=cut
=item $c->prepare_body_parameters
-Prepare body parameters.
+Prepares body parameters.
=cut
=item $c->prepare_connection
-Prepare connection.
+Prepares connection.
=cut
=item $c->prepare_cookies
-Prepare cookies.
+Prepares cookies.
=cut
=item $c->prepare_headers
-Prepare headers.
+Prepares headers.
=cut
=item $c->prepare_parameters
-Prepare parameters.
+Prepares parameters.
=cut
=item $c->prepare_path
-Prepare path and base.
+Prepares path and base.
=cut
=item $c->prepare_query_parameters
-Prepare query parameters.
+Prepares query parameters.
=cut
=item $c->prepare_read
-Prepare the input for reading.
+Prepares the input for reading.
=cut
=item $c->prepare_request
-Prepare the engine request.
+Prepares the engine request.
=cut
=item $c->prepare_uploads
-Prepare uploads.
+Prepares uploads.
=cut
=item $c->prepare_write
-Prepare the output for writing.
+Prepares the output for writing.
=cut
sub prepare_write { my $c = shift; $c->engine->prepare_write( $c, @_ ) }
-=item $c->request_class($class)
+=item $c->request_class
-Contains the request class.
+Returns or sets the request class.
-=item $c->response_class($class)
+=item $c->response_class
-Contains the response class.
+Returns or sets the response class.
=item $c->read( [$maxlength] )
-Read a chunk of data from the request body. This method is designed to be
+Reads a chunk of data from the request body. This method is designed to be
used in a while loop, reading $maxlength bytes on every call. $maxlength
defaults to the size of the request if not specified.
=item $c->set_action( $action, $code, $namespace, $attrs )
-Set an action in a given namespace.
+Sets an action in a given namespace.
=cut
=item $c->setup_actions($component)
-Setup actions for a component.
+Sets up actions for a component.
=cut
=item $c->setup_components
-Setup components.
+Sets up components.
=cut
=item version
-Returns the Catalyst version number. mostly useful for powered by messages
+Returns the Catalyst version number. Mostly useful for "powered by" messages
in template systems.
=cut
=item L<Catalyst::Manual> - The Catalyst Manual
+=item L<Catalyst::Component>, L<Catalyst::Base> - Base classes for components
+
=item L<Catalyst::Engine> - Core Engine
=item L<Catalyst::Log> - The Log Class.