Caca/Event/Mouse/Motion.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
« Caca/FFI.pm ↑ Summary Caca/Event/Resize.pm »
1 package Term::Caca::Event::Mouse::Motion;
2 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: event triggered by mouse movements.
4 $Term::Caca::Event::Mouse::Motion::VERSION = '3.1.0';
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 extends 'Term::Caca::Event';
7  
8 0 ▶use Term::Caca;
Subroutine BEGIN: called CC=1 SCAR=2.6
9  
10 has x =>
11 is => 'ro',
12 lazy => 1,
13 default => sub { Term::Caca::caca_get_event_mouse_x( $_[0]->event ) };
14  
15 has y =>
16 is => 'ro',
17 lazy => 1,
18 default => sub { Term::Caca::caca_get_event_mouse_y( $_[0]->event ) };
19  
20 has pos =>
21 is => 'ro',
22 lazy => 1,
23 default => sub { [ $_[0]->x, $_[0]->y ] };
24  
25 1;
26  
27 __END__
« Caca/FFI.pm ↑ Summary Caca/Event/Resize.pm »