Catalyst::Engine - The Catalyst Engine


See Catalyst.




Takes a coderef with arguments and returns elapsed time as float.

    my ( $elapsed, $status ) = $c->benchmark( sub { return 1 } );
    $c->log->info( sprintf "Processing took %f seconds", $elapsed );

Get a component object by name.


Regex search for a component.

$c->error($error, ...)

Returns an arrayref containing error messages.

    my @error = @{ $c->error };

Add a new error.

    $c->error('Something bad happened');
$c->execute($class, $coderef)

Execute a coderef in given class and catch exceptions. Errors are available via $c->error.


Finalize request.


alias to finalize_body


Finalize body.


Finalize cookies.


Finalize error.


Finalize headers.

$c->handler( $class, $engine )

Handles the request.


Turns the engine-specific request( Apache, CGI ... ) into a Catalyst context .


Prepare action.


Prepare message body.


Prepare connection.


Prepare cookies.


Prepare headers.


Prepare parameters.


Prepare path and base.


Prepare the engine request.


Prepare uploads.


Starts the engine.


Returns a Catalyst::Request object.

    my $req = $c->req;

Returns a Catalyst::Response object.

    my $res = $c->res;



Setup components.


Contains the return value of the last executed action.


Returns a hashref containing all your data.

    $c->stash->{foo} ||= 'yada';
    print $c->stash->{foo};


Sebastian Riedel,


This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.