Catalyst::ScriptRunner(3pm)

Catalyst::ScriptRunner3pm

The catalyst framework script runner

Usage

    # Will run MyApp::Script::Server if it exists, otherwise
    # will run Catalyst::Script::Server.
    Catalyst::ScriptRunner->run('MyApp', 'Server');

Overview

This class is responsible for loading and running scripts, either in the application specific namespace (e.g. "MyApp::Script::Server"), or the Catalyst namespace (e.g. "Catalyst::Script::Server").

If your application contains a custom script, then it will be used in preference to the generic script, and is expected to sub-class the standard script.

Trait loading

Catalyst will automatically load and apply roles to the scripts in your application.

"MyApp::TraitFor::Script" will be loaded if present, and will be applied to ALL scripts.

"MyApp::TraitFor::Script::XXXX" will be loaded (if present) and for script individually.

Methods

run ($application_class, $scriptclass)

Called with two parameters, the application class (e.g. MyApp) and the script class, (i.e. one of Server/FastCGI/CGI/Create/Test)

find_script_class ($appname, $script_name)

Finds and loads the class for the script, trying the application specific script first, and falling back to the generic script. Returns the script which was loaded.

find_script_traits ($appname, @try)

Finds and loads a set of traits. Returns the list of traits which were loaded.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Authors

Catalyst Contributors, see Catalyst.pm

From libcatalyst-perl 5.90132-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.