XRandR/Border.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 92.3% 24 / 26 CC 1 SCAR 1.5
CC
1
Cov
95%
to_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« XRandR/Grammar/Verbose.pm ↑ Summary XRandR/Offset.pm »
1 package X11::XRandR::Border;
2  
3 # ABSTRACT: Border
4  
5 1 ▶use Types::Common::Numeric qw[ PositiveOrZeroInt ];
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use MooX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our $VERSION = '0.01';
12  
13 1 ▶use overload '""' => \&to_string;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 #pod =attr left
16 #pod
17 #pod =attr top
18 #pod
19 #pod =attr right
20 #pod
21 #pod =attr bottom
22 #pod
23 #pod =cut
24  
25 has $_ => (
26 is => 'ro',
27 isa => PositiveOrZeroInt,
28 default => 0
29 1 ) for qw[ left top right bottom ];
30  
31 #pod =method to_string
32 #pod
33 #pod Return a string rendition of the object just as B<xrandr> would.
34 #pod
35 #pod =cut
36  
37 0 ▶sub to_string {
Subroutine to_string: not called CC=1 SCAR=6.9
Pod documented
38 0 sprintf( "%d/%d/%d/%d", $_[0]->left, $_[0]->top, $_[0]->right, $_[1]->bottom );
39 }
40  
41 1 1;
42  
43 #
44 # This file is part of X11-XRandR
45 #
46 # This software is Copyright (c) 2018 by Diab Jerius.
47 #
48 # This is free software, licensed under:
49 #
50 # The GNU General Public License, Version 3, June 2007
51 #
52  
53 __END__
« XRandR/Grammar/Verbose.pm ↑ Summary XRandR/Offset.pm »