| 1 | package Term::Caca::Event; | ||||||||||
| 2 | 8 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||
| 3 | # ABSTRACT: base class for Term::Caca events | ||||||||||
| 4 | 8 | $Term::Caca::Event::VERSION = '3.1.0'; | |||||||||
| 5 | |||||||||||
| 6 | 8 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 8 | ▶ | use FFI::Platypus::Memory; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 8 | has event => ( | |||||||||
| 11 | is => 'ro', | ||||||||||
| 12 | required => 1, | ||||||||||
| 13 | predicate => 1, | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | has type => ( | ||||||||||
| 17 | is => 'ro', | ||||||||||
| 18 | lazy => 1, | ||||||||||
| 19 | 0 | ▶ | default => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 20 | 0 | ( ref $_[0] ) =~ s/Term::Caca::Event:://r; | |||||||||
| 21 | } | ||||||||||
| 22 | 8 | ); | |||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub DEMOLISH { | ||||||||
|
Subroutine
DEMOLISH: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 25 | 0 | my $self = shift; | |||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | free $self->event if $self->has_event; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 8 | 1; | |||||||||
| 31 | |||||||||||
| 32 | __END__ | ||||||||||