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.037;
2             # ABSTRACT: something that stores options or data for later reference
3              
4 4     4   3472 use Moose::Role;
  4         9  
  4         33  
5              
6 4     4   23851 use Dist::Zilla::Pragmas;
  4         9  
  4         29  
7              
8 4     4   34 use namespace::autoclean;
  4         10  
  4         32  
9              
10             sub register_component {
11 6     6 0 21 my ($class, $name, $arg, $section) = @_;
12              
13             # $self->log_debug([ 'online, %s v%s', $self->meta->name, $version ]);
14 6         25 my $entry = $class->stash_from_config($name, $arg, $section);
15              
16 6         41 $section->sequence->assembler->register_stash($name, $entry);
17              
18 6         20 return;
19             }
20              
21             sub stash_from_config {
22 6     6 0 17 my ($class, $name, $arg, $section) = @_;
23              
24 6         309 my $self = $class->new($arg);
25 6         18 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.037
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
48             released in the last two to three years. (That is, if the most recently
49             released version is v5.40, then this module should work on both v5.40 and
50             v5.38.)
51              
52             Although it may work on older versions of perl, no guarantee is made that the
53             minimum required version will not be increased. The version may be increased
54             for any reason, and there is no promise that patches will be accepted to
55             lower the minimum required perl.
56              
57             =head1 AUTHOR
58              
59             Ricardo SIGNES 😏 <cpan@semiotic.systems>
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is copyright (c) 2026 by Ricardo SIGNES.
64              
65             This is free software; you can redistribute it and/or modify it under
66             the same terms as the Perl 5 programming language system itself.
67              
68             =cut