Caca/Event/Key.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 89.4% 17 / 19 CC 1 SCAR 2.2
CC
1
Cov
93%
char
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Caca/Event/Key/Release.pm ↑ Summary Caca/FFI.pm »
1 package Term::Caca::Event::Key;
2 3 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: event generated by a keyboard activity
4 3 $Term::Caca::Event::Key::VERSION = '3.0.0';
5  
6 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 extends 'Term::Caca::Event';
12  
13  
14  
15 sub char {
16 0 ▶ return chr Term::Caca::caca_get_event_key_ch( $_[0]->event );
Subroutine char: not called CC=1 SCAR=6.9
Pod documented
17 }
18  
19 3 1;
20  
21 __END__
22  
23 =pod
24  
25 =encoding UTF-8
26  
27 =head1 NAME
28  
29 Term::Caca::Event::Key - event generated by a keyboard activity
30  
31 =head1 VERSION
32  
33 version 3.0.0
34  
35 =head1 SYNOPSIS
36  
37 use Term::Caca qw/ :events /;
38  
39 my $t = Term::Caca->new;
40 while ( 1 ) {
41 my $event = $t->wait_for_event(
42 mask => $ANY_KEY,
43 );
44
45 print "character: ", $event->char;
46 }
47  
48 =head1 DESCRIPTION
49  
50 Generated when a key is pressed or released.
51  
52 =head1 METHODS
53  
54 =head2 char()
55  
56 Returns the character pressed or released.
57  
58 =head1 AUTHORS
59  
60 =over 4
61  
62 =item *
63  
64 John Beppu <beppu@cpan.org>
65  
66 =item *
67  
68 Yanick Champoux <yanick@cpan.org>
69  
70 =back
71  
72 =head1 COPYRIGHT AND LICENSE
73  
74 This software is Copyright (c) 2018, 2013, 2011 by John Beppu.
75  
76 This is free software, licensed under:
77  
78 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
79  
80 =cut
« Caca/Event/Key/Release.pm ↑ Summary Caca/FFI.pm »