Plack:...:Header(3pm)

πŸ“¦
version 0.04 Β· 2 versions
  • 0.04 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.04 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Plack::...::Header ✨

okay bestie, we're looking at Plack::Middleware::Header from the Perl docs, version 3pm β€” and yes the manual name really is spelled Plack:...:Header(3pm), no that's not a typo, that's just how the page is named, iykyk πŸ’…


πŸŽ€ NAME πŸŽ€

Plack::Middleware::Header β€” it modifies HTTP response headers. that's the whole job. that's the vibe. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, copy it exactly bestie, don't freestyle:

use Plack::Builder;

my $app = sub {['200', [], ['hello']]};
builder {
    enable 'Header',
      set => ['X-Plack-One' => '1'],
      append => ['X-Plack-Two' => '2'],
      unset => ['X-Plack-Three'];
    $app;
};

so you got your app, you got your builder, and you enable the Header middleware with set, append and unset doing their little header dance. iconic honestly 🌸


πŸ’– DESCRIPTION πŸ’–

the entire description on this page is, and I cannot stress this enough, literally just:

Plack::Middleware::Header

that's it. that's the description. no further elaboration, no notes, the module said "my name is enough" and honestly? main character energy πŸ‘‘


🌈 AUTHOR 🌈

  • Masahiro Chiba 🫢

πŸ“ LICENSE πŸ“

this library is free software β€” you can redistribute it and/or modify it under the same terms as Perl itself. slay, go wild, legally πŸ’œ


🧚 SEE ALSO 🧚

  • Plack::Middleware
  • Plack::Builder

go read those too, they're the friend group this module runs with πŸ’«


okay that's the whole page!! documented under perl v5.34.0, dated 2022-06-16, and filed as Plack:...:Header(3pm) β€” bye bestie, go set some headers πŸ’…βœ¨

πŸ“¦ where this page comes from