Caca/Event/Resize.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/Event/Mouse/Motion.pm ↑ Summary Caca/Bitmap.pm »
1 package Term::Caca::Event::Resize;
2 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: event triggered when the display is resized
4 $Term::Caca::Event::Resize::VERSION = '3.1.0';
5  
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 extends 'Term::Caca::Event';
8  
9 0 ▶use Term::Caca;
Subroutine BEGIN: called CC=1 SCAR=2.6
10  
11 has width =>
12 is => 'ro',
13 lazy => 1,
14 default => sub {
15 Term::Caca::caca_get_event_resize_width( $_[0]->event );
16 };
17  
18 has height =>
19 is => 'ro',
20 lazy => 1,
21 default => sub {
22 Term::Caca::caca_get_event_resize_height( $_[0]->event );
23 };
24  
25  
26 has size =>
27 is => 'ro',
28 lazy => 1,
29 default => sub {
30 [ $_[0]->width, $_[0]->height ];
31 };
32  
33 1;
34  
35 __END__
« Caca/Event/Mouse/Motion.pm ↑ Summary Caca/Bitmap.pm »