| 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.0.0'; | ||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use Term::Caca; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 9 | |||
| 10 | use Moose; | ||
| 11 | extends 'Term::Caca::Event'; | ||
| 12 | |||
| 13 | |||
| 14 | has x => | ||
| 15 | is => 'ro', | ||
| 16 | lazy => 1, | ||
| 17 | default => sub { Term::Caca::caca_get_event_mouse_x( $_[0]->event ) }; | ||
| 18 | |||
| 19 | has y => | ||
| 20 | is => 'ro', | ||
| 21 | lazy => 1, | ||
| 22 | default => sub { Term::Caca::caca_get_event_mouse_y( $_[0]->event ) }; | ||
| 23 | |||
| 24 | has pos => | ||
| 25 | is => 'ro', | ||
| 26 | lazy => 1, | ||
| 27 | default => sub { [ $_[0]->x, $_[0]->y ] }; | ||
| 28 | |||
| 29 | 1; | ||
| 30 | |||
| 31 | __END__ | ||
| 32 | |||
| 33 | =pod | ||
| 34 | |||
| 35 | =encoding UTF-8 | ||
| 36 | |||
| 37 | =head1 NAME | ||
| 38 | |||
| 39 | Term::Caca::Event::Mouse::Motion - event triggered by mouse movements. | ||
| 40 | |||
| 41 | =head1 VERSION | ||
| 42 | |||
| 43 | version 3.0.0 | ||
| 44 | |||
| 45 | =head1 AUTHORS | ||
| 46 | |||
| 47 | =over 4 | ||
| 48 | |||
| 49 | =item * | ||
| 50 | |||
| 51 | John Beppu <beppu@cpan.org> | ||
| 52 | |||
| 53 | =item * | ||
| 54 | |||
| 55 | Yanick Champoux <yanick@cpan.org> | ||
| 56 | |||
| 57 | =back | ||
| 58 | |||
| 59 | =head1 COPYRIGHT AND LICENSE | ||
| 60 | |||
| 61 | This software is Copyright (c) 2018, 2013, 2011 by John Beppu. | ||
| 62 | |||
| 63 | This is free software, licensed under: | ||
| 64 | |||
| 65 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004 | ||
| 66 | |||
| 67 | =cut | ||