File Coverage

blib/lib/App/Gimei/Generators.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1 9     9   801 use v5.40;
  9         32  
2 9     9   71 use feature 'class';
  9         14  
  9         1433  
3 9     9   80 no warnings 'experimental::class';
  9         16  
  9         839  
4              
5             class App::Gimei::Generators {
6              
7 9     9   53 use Data::Gimei;
  9         18  
  9         3502  
8              
9             #
10             # instance variables
11             #
12              
13             field $body : param = [];
14              
15             #
16             # instance methods
17             #
18              
19             method add_generator ($generator) {
20             push @{$body}, $generator;
21             }
22              
23             method execute () {
24             my ( @words, %cache );
25             foreach my $g ( @{$body} ) {
26             push( @words, $g->execute( \%cache ) );
27             }
28             return @words;
29             }
30              
31             method to_list () {
32             return @{$body};
33             }
34             }
35              
36             1;