| 1 | package Linux::Event::Kernel::Inotify::Event; | ||||||||||||||||||||||||||||
| 2 | 9 | ▶ | use v5.36; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 9 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 9 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 9 | our $VERSION = '0.119'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 9 | ▶ | use File::Spec (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 9 | ▶ | use constant IN_ISDIR => 0x40000000; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 325 | ▶ | sub _new ($class, $watch, $name, $mask, $cookie) { | ||||||||||||||||||||||||||
|
Subroutine
_new: called CC=3 SCAR=11.1
| |||||||||||||||||||||||||||||
| 13 | 325 | ▶ | my $path = defined($name) && length($name) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $name and length $name
MC/DC50%1/2
defined $name and length $name
defined $name
length $name
Truth table66%2/3
A and B
A= defined $nameB= length $name
| |||||||||||||||||||||||||||||
| 14 | ? File::Spec->catfile($watch->path, $name) | ||||||||||||||||||||||||||||
| 15 | : $watch->path; | ||||||||||||||||||||||||||||
| 16 | 325 | return bless { | |||||||||||||||||||||||||||
| 17 | watch => $watch, | ||||||||||||||||||||||||||||
| 18 | name => $name, | ||||||||||||||||||||||||||||
| 19 | path => $path, | ||||||||||||||||||||||||||||
| 20 | mask => $mask, | ||||||||||||||||||||||||||||
| 21 | cookie => $cookie, | ||||||||||||||||||||||||||||
| 22 | }, $class; | ||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 2 | ▶ | sub watch ($self) { $self->{watch} } | ||||||||||||||||||||||||||
|
Subroutine
watch: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 26 | 13 | ▶ | sub name ($self) { $self->{name} } | ||||||||||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 27 | 5 | ▶ | sub path ($self) { $self->{path} } | ||||||||||||||||||||||||||
|
Subroutine
path: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub mask ($self) { $self->{mask} } | ||||||||||||||||||||||||||
|
Subroutine
mask: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 29 | 3 | ▶ | sub cookie ($self) { $self->{cookie} } | ||||||||||||||||||||||||||
|
Subroutine
cookie: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 30 | 2 | ▶ | sub is_directory ($self) { !!($self->{mask} & IN_ISDIR) } | ||||||||||||||||||||||||||
|
Subroutine
is_directory: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 9 | 1; | |||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | __END__ | ||||||||||||||||||||||||||||