File Coverage

lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v2/PID.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 12 14 85.7


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