File Coverage

blib/lib/Amon2/Setup/Flavor/Minimum.pm
Criterion Covered Total %
statement 12 32 37.5
branch n/a
condition n/a
subroutine 4 7 57.1
pod 0 3 0.0
total 16 42 38.1


line stmt bran cond sub pod time code
1             use strict;
2 2     2   356030 use warnings FATAL => 'all';
  2         16  
  2         64  
3 2     2   13 use utf8;
  2         4  
  2         85  
4 2     2   13 use parent qw(Amon2::Setup::Flavor);
  2         4  
  2         15  
5 2     2   51  
  2         4  
  2         23  
6             our $VERSION = '6.16';
7              
8             my ($self) = @_;
9              
10 0     0 0   $self->render_file('lib/<<PATH>>.pm', 'Minimum/lib/__PATH__.pm');
11             $self->render_file("tmpl/index.tx", 'Minimum/tmpl/index.tx');
12 0           $self->render_file($self->psgi_file, 'Minimum/script/server.pl');
13 0           $self->render_file('lib/<<PATH>>/Web.pm', 'Minimum/lib/__PATH__/Web.pm');
14 0           $self->render_file('lib/<<PATH>>/Web/View.pm', 'Minimum/lib/__PATH__/Web/View.pm');
15 0           $self->render_file('lib/<<PATH>>/Web/ViewFunctions.pm', 'Minimum/lib/__PATH__/Web/ViewFunctions.pm', {
16 0           'context_class' => 'Amon2',
17 0           });
18             $self->render_file('Build.PL', 'Minimum/Build.PL');
19             $self->render_file('minil.toml', 'Minimum/minil.toml');
20 0           $self->render_file('builder/MyBuilder.pm', 'Minimum/builder/MyBuilder.pm');
21 0           $self->render_file('t/Util.pm', 'Minimum/t/Util.pm');
22 0           $self->render_file('t/00_compile.t', 'Minimum/t/00_compile.t', {
23 0           psgi_file => $self->psgi_file,
24 0           });
25             $self->render_file('t/01_root.t', 'Minimum/t/01_root.t', {
26             psgi_file => $self->psgi_file,
27 0           });
28             $self->render_file('t/02_mech.t', 'Minimum/t/02_mech.t', {
29             psgi_file => $self->psgi_file,
30 0           });
31             $self->render_file('xt/01_pod.t', 'Minimum/xt/01_pod.t');
32              
33 0           $self->create_cpanfile();
34             }
35 0            
36             my $self = shift;
37             'script/' . lc($self->{dist}) . '-server';
38             }
39 0     0 0    
40 0           my $self = shift;
41              
42             printf <<'...', $self->psgi_file;
43             --------------------------------------------------------------
44 0     0 0    
45             Setup script was done! You are ready to run the skelton.
46 0            
47             You need to install the dependencies by:
48              
49             > carton install
50              
51             And then, run your application server:
52              
53             > carton exec perl -Ilib %s
54              
55             --------------------------------------------------------------
56             ...
57             }
58              
59             1;
60              
61             =head1 NAME
62              
63             Amon2::Setup::Flavor::Minimum - Minimalistic flavor suitable for benchmarking
64              
65             =head1 SYNOPSIS
66              
67             % amon2-setup.pl --flavor=Minimum MyApp
68              
69             =head1 DESCRIPTION
70              
71             This is a flavor for benchmarking...
72              
73             =head1 AUTHOR
74              
75             Tokuhiro Matsuno