Marky/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
« Marky/Controller/Db.pm ↑ Summary
1 package Marky::Generator;
2 1 $Marky::Generator::VERSION = '0.0604';
3 # ABSTRACT: Marky::Generator - generates boilerplate for marky webapp
4  
5 1 ▶use Mojo::Base 'Mojolicious::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
8 0 my $self = shift;
9 0 $self->generate_config_file;
10 0 $self->generate_web_app;
11 }
12  
13 0 ▶sub generate_config_file {
Subroutine generate_config_file: not called CC=1 SCAR=6.9
Pod documented
14 0 shift->render_to_rel_file("marky.conf" => 'marky.conf');
15 }
16  
17 0 ▶sub generate_web_app {
Subroutine generate_web_app: not called CC=1 SCAR=6.9
Pod documented
18 0 my $self = shift;
19 0 $self->render_to_rel_file('webapp.pl' => 'webapp.pl');
20 0 $self->chmod_rel_file('webapp.pl' => 0755);
21 }
22  
23 1 1;
24  
25 =pod
26  
27 =encoding UTF-8
28  
29 =head1 NAME
30  
31 Marky::Generator - Marky::Generator - generates boilerplate for marky webapp
32  
33 =head1 VERSION
34  
35 version 0.0604
36  
37 =head1 NAME
38  
39 Marky::Generator - generates boilerplate for marky webapp
40  
41 =head1 VERSION
42  
43 version 0.0604
44  
45 =head2 init
46  
47 The init command generates boilerplate installation.
48  
49 =head2 generate_config_file
50  
51 Generates a config file.
52  
53 =head2 generate_web_app
54  
55 Generates a boilerplate webapp.pl file
56  
57 =head1 AUTHOR
58  
59 Kathryn Andersen <perlkat@katspace.org>
60  
61 =head1 COPYRIGHT AND LICENSE
62  
63 This software is copyright (c) 2017 by Kathryn Andersen.
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
69  
70 __DATA__
« Marky/Controller/Db.pm ↑ Summary