blib/lib/Linux/Fanotify.pm

filter: Statementstmt 71.4% 20 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 100% 1 / 1 totaltotal 64.8% 24 / 37 CC 1 SCAR 4.2
CC
1
Cov
71%
init
2.0
new
2.0
mark
2.0
CRAP 1.5
↑ Summary Fanotify.xs »
1 # Copyright (c) 2014 Collax GmbH
2 package Linux::Fanotify;
3  
4 4 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 require Exporter;
8 4 require DynaLoader;
9  
10 4 our @ISA = qw(Exporter DynaLoader);
11  
12 4 our %EXPORT_TAGS = (
13 consts => [qw(
14 FAN_ACCESS
15 FAN_MODIFY
16 FAN_CLOSE_WRITE
17 FAN_CLOSE_NOWRITE
18 FAN_OPEN
19  
20 FAN_Q_OVERFLOW
21  
22 FAN_OPEN_PERM
23 FAN_ACCESS_PERM
24  
25 FAN_ONDIR
26  
27 FAN_EVENT_ON_CHILD
28  
29 FAN_CLOSE
30  
31 FAN_CLOEXEC
32 FAN_NONBLOCK
33  
34 FAN_CLASS_NOTIF
35 FAN_CLASS_CONTENT
36 FAN_CLASS_PRE_CONTENT
37 FAN_ALL_CLASS_BITS
38  
39 FAN_UNLIMITED_QUEUE
40 FAN_UNLIMITED_MARKS
41  
42 FAN_ALL_INIT_FLAGS
43  
44 FAN_MARK_ADD
45 FAN_MARK_REMOVE
46 FAN_MARK_DONT_FOLLOW
47 FAN_MARK_ONLYDIR
48 FAN_MARK_MOUNT
49 FAN_MARK_IGNORED_MASK
50 FAN_MARK_IGNORED_SURV_MODIFY
51 FAN_MARK_FLUSH
52  
53 FAN_ALL_MARK_FLAGS
54  
55 FAN_ALL_EVENTS
56  
57 FAN_ALL_PERM_EVENTS
58  
59 FAN_ALL_OUTGOING_EVENTS
60  
61 FANOTIFY_METADATA_VERSION
62  
63 FAN_ALLOW
64 FAN_DENY
65 FAN_NOFD
66 )],
67 funcs => [qw(
68 fanotify_init
69 fanotify_mark
70 fanotify_read
71 fanotify_write
72 )],
73 );
74  
75 4 our @EXPORT_OK = map {@{$_}} values %EXPORT_TAGS;
76  
77 4 bootstrap Linux::Fanotify;
78  
79 ################################################################################
80  
81 4 our $default_response = -1;
82  
83 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
84 0 my $class = shift;
85 0 return fanotify_init(@_);
86 }
87  
88 package Linux::Fanotify::FanotifyGroup;
89  
90 4 our $autoclose = 1;
91  
92 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
93 0 my $class = shift;
94 0 return Linux::Fanotify::fanotify_init(@_);
95 }
96  
97 0 ▶sub mark {
Subroutine mark: not called CC=1 SCAR=6.9
98 0 return Linux::Fanotify::fanotify_mark(@_);
99 }
100  
101 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
102 0 return Linux::Fanotify::fanotify_read(@_);
103 }
104  
105 package Linux::Fanotify::Event;
106  
107 4 our $autoclose = 1;
108  
109 0 ▶use overload '""' => sub { my $self = shift; return $self->_stringify(); };
Subroutine BEGIN: called CC=1 SCAR=0.6
Subroutine __ANON__: not called CC=1 SCAR=0.6
110  
111 4 1;
112  
113 __END__
↑ Summary Fanotify.xs »