Mojo::...Devices(3pm)

✨ NAME ✨

Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Devices β€” the CGroups v1 Devices Controller, aka the little module that decides which devices your process is allowed to touch πŸ’… (it lives in the Mojo::...Devices(3pm) family, if you were wondering where you wandered in from)


πŸ¦‹ SYNOPSIS πŸ¦‹

use Mojo::IOLoop::ReadWriteProcess::CGroup::v1;

my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new( name => "test" );

$cgroup->devices->allow('a *:* rwm');

that's it. that's the whole vibe. three lines and you're granting device access like a boss 😌


🌸 DESCRIPTION 🌸

okay so bestie, listen πŸ’– this module uses features that are only available on Linux. Periodt. No macOS moment, no Windows era, Linux only.

On top of that, it requires cgroups and the capability for unshare syscalls, because that's how it pulls off pid isolation. So like, the whole point is giving your process its own little bubble where the pids can't see each other. main character energy fr fr πŸ‘‘

ngl if you're not on Linux or you don't have those things, this is not the module for you and it will simply not slay.

πŸŽ€ METHODS πŸŽ€

Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Devices inherits all methods from Mojo::Base β€” every single one, she's a nepo baby and we love that for her 🫢 β€” and it implements the following new ones.

...and bestie, the list right here? It's empty. Like, genuinely. Not me lying to you, that is literally the entire section in the source. no cap. So the inherited Mojo::Base methods are what you're working with, plus whatever the devices accessor gives you back in that synopsis up there πŸ‘€


πŸ’œ LICENSE πŸ’œ

Copyright (C) Ettore Di Giacinto.

This library is free software β€” you can redistribute it and/or modify it under the same terms as Perl itself. ✨ go wild, just keep the same terms, iykyk.


🌈 AUTHOR 🌈

Ettore Di Giacinto <edigiacinto@suse.com> β€” the icon, the legend, the moment πŸ‘‘


okay and for the cute sign-off: this whole thing is documented as perl v5.42.0, dated 2025-07-25, and yes, it's the Mojo::...Devices(3pm) page β€” thanks for coming to my ted talk, drink water, go isolate some pids πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from