Markdent/Role/EventsAsMethods.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Markdent/Role/EventAsText.pm ↑ Summary Markdent/Role/Handler.pm »
1 package Markdent::Role::EventsAsMethods;
2  
3 35 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 35 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 35 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 35 our $VERSION = '0.41';
8  
9 35 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 35 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 35 with 'Markdent::Role::Handler';
14  
15 5483 ▶sub handle_event {
Subroutine handle_event: called CC=1 SCAR=0.0
Pod documented
16 5483 my $self = shift;
17 5483 my $event = shift;
18  
19 5483 my $meth = $event->event_name;
20  
21 5483 $self->$meth( $event->kv_pairs_for_attributes );
22 }
23  
24 35 1;
25  
26 # ABSTRACT: Turns events into method calls
27  
28 __END__
« Markdent/Role/EventAsText.pm ↑ Summary Markdent/Role/Handler.pm »