File Coverage

lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Netcls.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 10 11 90.9


line stmt bran cond sub pod time code
1             package Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Netcls;
2              
3 15     15   103 use Mojo::Base -base;
  15         41  
  15         93  
4              
5 15     15   2365 use constant CLASSID_INTERFACE => 'net_cls.classid';
  15         35  
  15         2498  
6              
7             has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new };
8              
9 2     2 0 1797 sub classid { shift->cgroup->_setget(CLASSID_INTERFACE, @_) }
10              
11             1;
12              
13             =encoding utf-8
14              
15             =head1 NAME
16              
17             Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Netcls - CGroups v1 Netcls Controller.
18              
19             =head1 SYNOPSIS
20              
21             use Mojo::IOLoop::ReadWriteProcess::CGroup::v1;
22              
23             my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new( name => "test" );
24              
25             $cgroup->netcls->current;
26              
27             =head1 DESCRIPTION
28              
29             This module uses features that are only available on Linux,
30             and requires cgroups and capability for unshare syscalls to achieve pid isolation.
31              
32             =head1 METHODS
33              
34             L inherits all methods from L and implements
35             the following new ones.
36              
37             =head1 LICENSE
38              
39             Copyright (C) Ettore Di Giacinto.
40              
41             This library is free software; you can redistribute it and/or modify
42             it under the same terms as Perl itself.
43              
44             =head1 AUTHOR
45              
46             Ettore Di Giacinto Eedigiacinto@suse.comE
47              
48             =cut