CI

Linux::Event

Linux::Event is a Linux-native readiness event loop for Perl. It currently ships with an epoll backend and is built around small Linux kernel primitives: timerfd, signalfd, eventfd, and pidfd.

Linux::Event->new returns a Linux::Event::Loop object directly. Additional readiness backends may be added in future releases.

Architecture

The goal is a small, explicit, composable foundation for building event-driven systems on Linux.

Linux::Event
    |
    +-- Linux::Event::Loop
            |
            +-- Linux::Event::Backend::Epoll

What this distribution contains

Core modules in this repository:

Quick start

use v5.36;
use Linux::Event;

my $loop = Linux::Event->new;

$loop->after(0.250, sub ($loop) {
  say "timer fired";
  $loop->stop;
});

$loop->run;

You may pass backend => 'epoll' explicitly, but it is also the default:

my $loop = Linux::Event->new(backend => 'epoll');

Core API

The loop exposes a focused readiness API:

Watcher callbacks receive:

sub ($loop, $fh, $watcher) { ... }

Timer callbacks receive:

sub ($loop) { ... }

Signal callbacks receive:

sub ($loop, $sig, $count, $data) { ... }

Pid callbacks receive:

sub ($loop, $pid, $status, $data) { ... }

Ecosystem layering

This distribution intentionally stays at the loop-and-primitives layer. Companion distributions provide higher-level building blocks:

Canonical networking composition:

Listen / Connect
        |
      Stream
        |
   your protocol

Dependencies

Runtime dependencies are intentionally small:

Examples

See examples/ for small programs covering timers, filehandle readiness, signals, wakeups, pidfds, and epoll regression cases.

Project status

This project is still pre-1.0. The loop is intentionally focused on readiness backends so the stable API can stay small and maintainable.