Feersum::Runner(3pm)

✨ Feersum::Runner ✨

okay bestie, welcome to Feersum::Runner β€” it's the feersum script core, aka the little engine that runs your feersum scripts πŸ’– (this is from the Feersum::Runner(3pm) page, for the record, in case you're deep in man and needed a friend)


🌸 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);

like. look at that. so clean, so demure πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically it's giving Plack::Runner, except with far fewer options. that's the whole vibe. it does the same core job but it's not out here doing the most β€” it's lowkey, it's streamlined, and honestly? iconic for that. πŸ’…


πŸ‘‘ METHODS πŸ‘‘

πŸ’œ Feersum::Runner->new(%params)

gives you back a Feersum::Runner singleton β€” and hear me out, this is the important bit: the params you pass in are only applied on the first invocation. so if you call new again? yeah those params just get ignored, bestie. first one wins. periodt. πŸ™ˆ

here's what you can hand it:

  • listen β€” listen on this TCP socket, in host:port format 🫢
  • pre_fork β€” fork this many worker processes. the fork runs immediately at startup, and then again after the app is loaded β€” aka inside the run() method. so it's a two-part situation, fr fr.
  • keepalive β€” enable/disable http keepalive requests βœ…
  • read_timeout β€” set the read/keepalive timeout, in seconds ⏱️
  • max_connection_reqs β€” set the max requests per connection when keepalive is in play. 0 is the default, and 0 means 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 app code reference you specified. and bestie, read this twice: this is not a PSGI app β€” it's a native Feersum app. the way that matters 😭


⭐ $runner->assign_request_handler($subref)

this one's for the sub-classes to override β€” it assigns an app handler (think Plack::Handler::Feersum, that whole crowd πŸ’…). by default, it assigns a Feersum-native handler β€” and to be super clear, that is not a PSGI handler. no cap.


πŸŽ€ $runner->quit()

kicks off a graceful shutdown πŸ¦‹. and plot twist: a signal handler for SIGQUIT will call this method for you β€” so like, she's already on it, you don't even have to ask πŸ’–


🌈 AUTHOR 🌈

Jeremy Stashewsky, "stash@cpan.org" β€” thank you for your service, king πŸ‘‘


Copyright (C) 2010 by Jeremy Stashewsky & Socialtext Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.


and that's the whole page, bestie β€” perl v5.40.1, dated 2025-04-13, Feersum::Runner(3pm) 🫢 go run your scripts, you're gonna slay βœ¨πŸ’œ

πŸ“¦ where this page comes from