File Coverage

blib/lib/Dist/Zilla/Role/Stash.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 21 23 91.3


line stmt bran cond sub pod time code
1             package Dist::Zilla::Role::Stash 6.030;
2             # ABSTRACT: something that stores options or data for later reference
3              
4 4     4   3170 use Moose::Role;
  4         18  
  4         36  
5              
6 4     4   22110 use Dist::Zilla::Pragmas;
  4         13  
  4         30  
7              
8 4     4   31 use namespace::autoclean;
  4         13  
  4         47  
9              
10             sub register_component {
11 6     6 0 25 my ($class, $name, $arg, $section) = @_;
12              
13             # $self->log_debug([ 'online, %s v%s', $self->meta->name, $version ]);
14 6         46 my $entry = $class->stash_from_config($name, $arg, $section);
15              
16 6         30 $section->sequence->assembler->register_stash($name, $entry);
17              
18 6         21 return;
19             }
20              
21             sub stash_from_config {
22 6     6 0 25 my ($class, $name, $arg, $section) = @_;
23              
24 6         185 my $self = $class->new($arg);
25 6         20 return $self;
26             }
27              
28             1;
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             Dist::Zilla::Role::Stash - something that stores options or data for later reference
39              
40             =head1 VERSION
41              
42             version 6.030
43              
44             =head1 PERL VERSION
45              
46             This module should work on any version of perl still receiving updates from
47             the Perl 5 Porters. This means it should work on any version of perl released
48             in the last two to three years. (That is, if the most recently released
49             version is v5.40, then this module should work on both v5.40 and v5.38.)
50              
51             Although it may work on older versions of perl, no guarantee is made that the
52             minimum required version will not be increased. The version may be increased
53             for any reason, and there is no promise that patches will be accepted to lower
54             the minimum required perl.
55              
56             =head1 AUTHOR
57              
58             Ricardo SIGNES 😏 <cpan@semiotic.systems>
59              
60             =head1 COPYRIGHT AND LICENSE
61              
62             This software is copyright (c) 2023 by Ricardo SIGNES.
63              
64             This is free software; you can redistribute it and/or modify it under
65             the same terms as the Perl 5 programming language system itself.
66              
67             =cut