File Coverage

blib/lib/Devel/Events/Handler.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package Devel::Events::Handler;
4 1     1   1772 use Moose::Role;
  0            
  0            
5              
6             requires "new_event";
7              
8             __PACKAGE__;
9              
10             __END__
11              
12             =pod
13              
14             =head1 NAME
15              
16             Devel::Events::Handler - An optional base role for event handlers.
17              
18             =head1 SYNOPSIS
19              
20             package MyGen;
21             use Moose;
22              
23             with qw/Devel::Events::Handler/;
24              
25             sub new_event {
26             my ( $self, $type, %data ) = @_;
27              
28             # ...
29             }
30              
31              
32             =head1 DESCRIPTION
33              
34             This convenience role reminds you to add a C<new_event> method.
35              
36             =head1 REQUIRED METHODS
37              
38             =over 4
39              
40             =item new_event @event
41              
42             Handle a fired event.
43              
44             =back
45              
46             =cut
47              
48