POE::F...eFilter(3pm)

πŸ’– NAME πŸ’–

POE::Filter::SSL::Prefilter β€” bestie, this lil module lets you slap a PreFilter onto Components that are out here using Wheels ✨


🌸 VERSION 🌸

Version 0.39 πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Ok so listen. This right here is an extension for certain POE::Component::Server modules, and what it does is let them run POE::Filters in front of the filters they already use. Like a filter filter. Filter-ception, and honestly? Iconic πŸ’…


✨ SYNOPSIS ✨

Here's the vibe check: normally, filters like POE::Filter::SSL can only be used if you manually create the POE::Wheel yourself. Lowkey annoying. This module makes it possible to do that same thing when a component is the one doing the wheel-creating πŸ™ˆ

So like, it's giving "hey component, hold this PreFilter for me" 🫢

🌈 HTTPS-Server

use POE::Filter::SSL;
use POE::Component::Server::HTTP;
use HTTP::Status;
my $aliases = POE::Component::Server::HTTP->new(
  Port => 443,
  ContentHandler => {
    '/' => \&handler,
    '/dir/' => sub { return; },
    '/file' => sub { return; }
  },
  Headers => { Server => 'My Server' },
  PreFilter => POE::Filter::SSL->new(
    crt    => 'server.crt',
    key    => 'server.key',
    cacrt  => 'ca.crt'
  )
);

sub handler {
  my ($request, $response) = @_;
  $response->code(RC_OK);
  $response->content("Hi, you fetched ". $request->uri);
  return RC_OK;
}

POE::Kernel->run();
POE::Kernel->call($aliases->{httpd}, "shutdown");
# next line isn't really needed
POE::Kernel->call($aliases->{tcp}, "shutdown");

Periodt. Look at that PreFilter key just sitting there doing main character energy πŸ”₯

Heads up bestie: that comment in the code is fr fr β€” that last line re: $aliases->{tcp} isn't really needed. The original said it, I'm just passing the message along πŸ’–

Copyright 2010-2017 Markus Schraeder, CryptoMagic GmbH, all rights reserved. 🌸

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay, honestly β€” free software ate and left no crumbs πŸ’…


And that's the whole page, bestie! 🌈 This was POE::F...eFilter(3pm) from perl v5.42.3, dated 2026-08-21 β€” go forth and PreFilter responsibly πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from