logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Feersum::Runner - feersum script core

Author

       Jeremy Stashewsky, "stash@cpan.org"

Description

       Much like Plack::Runner, but with far fewer options.

Methods

       "Feersum::Runner->new(%params)"
           Returns a Feersum::Runner singleton.  Params are only applied for the first invocation.

           listen  Listen on this TCP socket ("host:port" format).

           pre_fork
                   Fork this many worker processes.

                   The  fork  is  run  immediately  at  startup  and  after the app is loaded (i.e. in the run()
                   method).

           keepalive
                   Enable/disable http keepalive requests.

           read_timeout
                   Set read/keepalive timeout in seconds.

           max_connection_reqs
                   Set max requests per connection in case of keepalive - 0(default) for unlimited.

           quiet   Don't be so noisy. (default: on)

           app_file
                   Load this filename as a native feersum app.

       "$runner->run($feersum_app)"
           Run Feersum with the specified app code reference.  Note that this is not a PSGI app,  but  a  native
           Feersum app.

       "$runner->assign_request_handler($subref)"
           For  sub-classes  to  override, assigns an app handler. (e.g.  Plack::Handler::Feersum).  By default,
           this assigns a Feersum-native (and not PSGI) handler.

       "$runner->quit()"
           Initiate a graceful shutdown.  A signal handler for SIGQUIT will call this method.

Name

       Feersum::Runner - feersum script core

Synopsis

           use Feersum::Runner;
           my $runner = Feersum::Runner->new(
               listen => 'localhost:5000',
               pre_fork => 0,
               quiet => 1,
               app_file => 'app.feersum',
           );
           $runner->run($feersum_app);

See Also