XRandR/CurCrtc.pm

filter: Statementstmt 81.2% 26 / 32 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 72.3% 34 / 47 CC 4 SCAR 20.7
CC
4
Cov
68%
to_string
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.9
« XRandR/Receiver/Verbose.pm ↑ Summary XRandR/State.pm »
1 package X11::XRandR::CurCrtc;
2  
3 # ABSTRACT: Current CRTC
4  
5 1 ▶use Types::Standard qw[ InstanceOf ];
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Types::Common::Numeric qw[ PositiveOrZeroInt ];
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use X11::XRandR::Types -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use MooX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 our $VERSION = '0.01';
14  
15 1 ▶use overload '""' => \&to_string;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 #pod =attr panning
18 #pod
19 #pod An instance of L<X11::XRandR::Geometry>. Optional.
20 #pod
21 #pod =method has_panning
22 #pod
23 #pod I<Boolean> True if L<panning> was specified.
24 #pod
25 #pod =cut
26  
27 1 has panning => (
28 is => 'ro',
29 isa => InstanceOf ['X11::XRandR::Geometry'],
30 predicate => 1
31 );
32  
33 #pod =attr tracking
34 #pod
35 #pod An instance of L<X11::XRandR::Geometry>. Optional.
36 #pod
37 #pod =method has_tracking
38 #pod
39 #pod I<Boolean> True if L<tracking> was specified.
40 #pod
41 #pod =cut
42  
43 1 has tracking => (
44 is => 'ro',
45 isa => InstanceOf ['X11::XRandR::Geometry'],
46 predicate => 1
47 );
48  
49 #pod =attr border
50 #pod
51 #pod An instance of L<X11::XRandR::Border>. Optional.
52 #pod
53 #pod =method has_border
54 #pod
55 #pod I<Boolean> True if L<border> was specified.
56 #pod
57 #pod =cut
58  
59 1 has border => (
60 is => 'ro',
61 isa => InstanceOf ['X11::XRandR::Border'],
62 predicate => 1
63 );
64  
65 #pod =method to_string
66 #pod
67 #pod Return a string rendition of the object just as B<xrandr> would.
68 #pod
69 #pod =cut
70  
71 0 ▶sub to_string {
Subroutine to_string: not called CC=4 SCAR=30.0
Pod documented
72  
73 0 my $self = shift;
74  
75 0 my @text;
76 0 ▶ push @text, sprintf( "panning %s", $self->panning->to_string ) if $self->have_panning;
Branch: 1 branch
BranchTrueFalseTotal
if $self->have_panning 0 0 0
77 0 ▶ push @text, sprintf( "tracking %s", $self->tracking->to_string ) if $self->have_tracking;
Branch: 1 branch
BranchTrueFalseTotal
if $self->have_tracking 0 0 0
78 0 ▶ push @text, sprintf( "tracking %s", $self->tracking->to_string ) if $self->have_tracking;
Branch: 1 branch
BranchTrueFalseTotal
if $self->have_tracking 0 0 0
79  
80 0 return join( ' ', @text );
81 }
82  
83 1 1;
84  
85 #
86 # This file is part of X11-XRandR
87 #
88 # This software is Copyright (c) 2018 by Diab Jerius.
89 #
90 # This is free software, licensed under:
91 #
92 # The GNU General Public License, Version 3, June 2007
93 #
94  
95 __END__
« XRandR/Receiver/Verbose.pm ↑ Summary XRandR/State.pm »