blib/lib/Amon2/Setup/Flavor/Minimum.pm

filter: Statementstmt 41.1% 14 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 40.9% 18 / 44 CC 1 SCAR 3.6
CC
1
Cov
41%
run
2.0
psgi_file
2.0
show_banner
2.0
CRAP 1.4
« blib/lib/Amon2/Web/Response/Callback.pm ↑ Summary blib/lib/Amon2/ContextGuard.pm »
1 package Amon2::Setup::Flavor::Minimum;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use parent qw(Amon2::Setup::Flavor);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '6.18';
8  
9 0 ▶sub run {
Subroutine run: not called CC=1 SCAR=6.9
Pod undocumented
10 0 my ($self) = @_;
11  
12 0 $self->render_file('lib/<<PATH>>.pm', 'Minimum/lib/__PATH__.pm');
13 0 $self->render_file("tmpl/index.tx", 'Minimum/tmpl/index.tx');
14 0 $self->render_file($self->psgi_file, 'Minimum/script/server.pl');
15 0 $self->render_file('lib/<<PATH>>/Web.pm', 'Minimum/lib/__PATH__/Web.pm');
16 0 $self->render_file('lib/<<PATH>>/Web/View.pm', 'Minimum/lib/__PATH__/Web/View.pm');
17 0 $self->render_file('lib/<<PATH>>/Web/ViewFunctions.pm', 'Minimum/lib/__PATH__/Web/ViewFunctions.pm', {
18 'context_class' => 'Amon2',
19 });
20 0 $self->render_file('Build.PL', 'Minimum/Build.PL');
21 0 $self->render_file('minil.toml', 'Minimum/minil.toml');
22 0 $self->render_file('builder/MyBuilder.pm', 'Minimum/builder/MyBuilder.pm');
23 0 $self->render_file('t/Util.pm', 'Minimum/t/Util.pm');
24 0 $self->render_file('t/00_compile.t', 'Minimum/t/00_compile.t', {
25 psgi_file => $self->psgi_file,
26 });
27 0 $self->render_file('t/01_root.t', 'Minimum/t/01_root.t', {
28 psgi_file => $self->psgi_file,
29 });
30 0 $self->render_file('t/02_mech.t', 'Minimum/t/02_mech.t', {
31 psgi_file => $self->psgi_file,
32 });
33 0 $self->render_file('xt/01_pod.t', 'Minimum/xt/01_pod.t');
34  
35 0 $self->create_cpanfile();
36 }
37  
38 0 ▶sub psgi_file {
Subroutine psgi_file: not called CC=1 SCAR=6.9
Pod undocumented
39 0 my $self = shift;
40 0 'script/' . lc($self->{dist}) . '-server';
41 }
42  
43 0 ▶sub show_banner {
Subroutine show_banner: not called CC=1 SCAR=6.9
Pod undocumented
44 0 my $self = shift;
45  
46 0 printf <<'...', $self->psgi_file;
47 --------------------------------------------------------------
48  
49 Setup script was done! You are ready to run the skelton.
50  
51 You need to install the dependencies by:
52  
53 > carton install
54  
55 And then, run your application server:
56  
57 > carton exec perl -Ilib %s
58  
59 --------------------------------------------------------------
60 ...
61 }
62  
63 2 1;
64 __END__
« blib/lib/Amon2/Web/Response/Callback.pm ↑ Summary blib/lib/Amon2/ContextGuard.pm »