| 1 | package X11::XRandR::Offset; | ||
| 2 | |||
| 3 | # ABSTRACT: Offset | ||
| 4 | |||
| 5 | 2 | ▶ | use Types::Standard qw[ Int ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 2 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use MooX::StrictConstructor; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 2 | our $VERSION = '0.01'; | |
| 12 | |||
| 13 | 2 | ▶ | use overload '""' => \&to_string; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | #pod =attr x | ||
| 16 | #pod | ||
| 17 | #pod =attr y | ||
| 18 | #pod | ||
| 19 | #pod An offset | ||
| 20 | #pod | ||
| 21 | #pod =cut | ||
| 22 | |||
| 23 | has $_ => ( | ||
| 24 | is => 'ro', | ||
| 25 | isa => Int, | ||
| 26 | default => 0, | ||
| 27 | 2 | ) for qw[ x y ]; | |
| 28 | |||
| 29 | #pod =method to_string | ||
| 30 | #pod | ||
| 31 | #pod Return a string rendition of the object just as B<xrandr> would. | ||
| 32 | #pod | ||
| 33 | #pod =cut | ||
| 34 | |||
| 35 | 0 | ▶ | sub to_string { |
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 36 | 0 | sprintf( "%+d%+d", $_[0]->x, $_[0]->y ); | |
| 37 | } | ||
| 38 | |||
| 39 | 2 | 1; | |
| 40 | |||
| 41 | # | ||
| 42 | # This file is part of X11-XRandR | ||
| 43 | # | ||
| 44 | # This software is Copyright (c) 2018 by Diab Jerius. | ||
| 45 | # | ||
| 46 | # This is free software, licensed under: | ||
| 47 | # | ||
| 48 | # The GNU General Public License, Version 3, June 2007 | ||
| 49 | # | ||
| 50 | |||
| 51 | __END__ | ||