File Coverage

examples/neo-makemaker/inc/My/NeoDynDepsLite.pm
Criterion Covered Total %
statement 15 16 93.7
branch 1 2 50.0
condition 1 2 50.0
subroutine 5 5 100.0
pod 0 2 0.0
total 22 27 81.4


line stmt bran cond sub pod time code
1 1     1   848 use 5.006;
  1         4  
2 1     1   8 use strict;
  1         2  
  1         46  
3 1     1   6 use warnings;
  1         1  
  1         188  
4              
5             package inc::My::NeoDynDepsLite;
6              
7             # ABSTRACT: A Lightweight injector thingy
8              
9             # AUTHORITY
10              
11             # Look ma, no Dzil! no Moose! Nothing!
12              
13 2 50   2 0 634 sub new { return bless { ref $_[1] ? %{ $_[1] } : @_[ 1 .. $#_ ] }, $_[0] }
  0         0  
14              
15             # This is obviously a rediculously tiny and simple big of code
16             # in comparison with the normal shenanigans.
17             sub inject_prelude {
18 2     2 0 5 my ( $self, $event ) = @_;
19 2         60 my $text = $event->prelude;
20 2   50     11 my $letter = $self->{letter} || 'H';
21 2         6 $text .= <<"EOF";
22             print "This message brought to you by the letter $letter";
23             EOF
24 2         68 $event->prelude($text);
25 2         6 return;
26             }
27              
28             1;