Caca/Event/Mouse/Button.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 20.0% 1 / 5 Podpod 0.0% 0 / 3 totaltotal 45.0% 9 / 20 CC 1 SCAR 5.9
CC
1
Cov
67%
__ANON__
2.0
left
2.0
right
2.0
CRAP 1.8
« Caca/Event.pm ↑ Summary Caca/Event/Key.pm »
1 package Term::Caca::Event::Mouse::Button;
2 3 our $AUTHORITY = 'cpan:YANICK';
3 3 $Term::Caca::Event::Mouse::Button::VERSION = '3.1.0';
4 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 extends 'Term::Caca::Event';
6  
7 has index =>
8 is => 'ro',
9 lazy => 1,
10 0 ▶ default => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
11 0 Term::Caca::caca_get_event_mouse_button( $_[0]->event );
12 3 };
13  
14 0 ▶sub left { return 1 == $_[0]->index }
Subroutine left: not called CC=1 SCAR=6.9
Pod undocumented
15 0 ▶sub right { return 3 == $_[0]->index }
Subroutine right: not called CC=1 SCAR=6.9
Pod undocumented
16 0 ▶sub middle { return 2 == $_[0]->index }
Subroutine middle: not called CC=1 SCAR=6.9
Pod undocumented
17  
18 3 1;
19  
20 __END__
« Caca/Event.pm ↑ Summary Caca/Event/Key.pm »