File/Generated.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
_build_content
1.0
CRAP 1.0
« Plugin/Web/StripBOM.pm ↑ Summary Plugin/Web.pm »
1 package Dist::Zilla::File::Generated;
2 2 $Dist::Zilla::File::Generated::VERSION = '0.0.10';
3 # ABSTRACT: a file whose content is built on demand and changed later
4 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 extends 'Dist::Zilla::File::FromCode';
9  
10 2 has 'content' => (
11 is => 'rw',
12 isa => 'Str',
13 lazy => 1,
14
15 builder => '_build_content',
16 );
17  
18  
19 7 ▶sub _build_content {
Subroutine _build_content: called CC=1 SCAR=0.0
20 7 my ($self) = @_;
21  
22 7 my $code = $self->code;
23
24 7 return $self->$code;
25 }
26  
27 2 __PACKAGE__->meta->make_immutable;
28 2 1;
29  
30 __END__
« Plugin/Web/StripBOM.pm ↑ Summary Plugin/Web.pm »