Muster/Generator.pm

filter: Statementstmt 41.6% 5 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 1 / 4 Podpod 100% 3 / 3 totaltotal 47.3% 9 / 19 CC 1 SCAR 5.6
CC
1
Cov
42%
init
2.0
generate_config_file
2.0
generate_web_app
2.0
CRAP 1.8
« Muster/Hook/Toggle.pm ↑ Summary Muster/Hook.pm »
1 package Muster::Generator;
2 2 $Muster::Generator::VERSION = '0.96';
3 # ABSTRACT: Muster::Generator - generates boilerplate for muster webapp
4  
5 =head1 NAME
6  
7 Muster::Generator - generates boilerplate for muster webapp
8  
9 =head1 VERSION
10  
11 version 0.96
12  
13 =cut
14  
15 2 ▶use Mojo::Base 'Mojolicious::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 =head2 init
18  
19 Generate the boilerplate files.
20  
21 =cut
22 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
23 0 my $self = shift;
24 0 $self->generate_config_file;
25 0 $self->generate_web_app;
26 }
27  
28 =head2 generate_config_file
29  
30 Generate a boilerplate muster.conf file
31  
32 =cut
33 0 ▶sub generate_config_file {
Subroutine generate_config_file: not called CC=1 SCAR=6.9
Pod documented
34 0 shift->render_to_rel_file("muster.conf" => 'muster.conf');
35 }
36  
37 =head2 generate_web_app
38  
39 Generate a boilerplate webapp.pl file
40  
41 =cut
42 0 ▶sub generate_web_app {
Subroutine generate_web_app: not called CC=1 SCAR=6.9
Pod documented
43 0 my $self = shift;
44 0 $self->render_to_rel_file('webapp.pl' => 'webapp.pl');
45 0 $self->chmod_rel_file('webapp.pl' => 0755);
46 }
47  
48 2 1;
49  
50 __DATA__
« Muster/Hook/Toggle.pm ↑ Summary Muster/Hook.pm »