line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Scaffolder::Command::html; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$App::Scaffolder::Command::html::VERSION = '0.001000'; |
4
|
|
|
|
|
|
|
} |
5
|
1
|
|
|
1
|
|
278748
|
use parent qw(App::Scaffolder::Command); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Scaffold a basic HTML file |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
63
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
10
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use MRO::Compat; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
13
|
1
|
|
|
1
|
|
6
|
use Path::Class::Dir; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
201
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub get_variables { |
18
|
3
|
|
|
3
|
1
|
4071
|
my ($self, $opt) = @_; |
19
|
|
|
|
|
|
|
return { |
20
|
3
|
|
100
|
|
|
11
|
name => scalar $opt->name(), |
21
|
|
|
|
|
|
|
title => scalar $opt->title() || scalar $opt->name(), |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub get_dist_name { |
28
|
6
|
|
|
6
|
1
|
835
|
return 'App-Scaffolder-HTML'; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_options { |
34
|
3
|
|
|
3
|
1
|
64143
|
my ($class) = @_; |
35
|
|
|
|
|
|
|
return ( |
36
|
3
|
|
|
|
|
32
|
[ 'name|n=s' => 'Name of the new HTML file that should be created, without suffix' ], |
37
|
|
|
|
|
|
|
[ 'title=s' => 'Title of the new HTML document that should be created' ], |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub validate_args { |
43
|
3
|
|
|
3
|
1
|
8830
|
my ($self, $opt, $args) = @_; |
44
|
|
|
|
|
|
|
|
45
|
3
|
|
|
|
|
28
|
$self->next::method($opt, $args); |
46
|
3
|
50
|
33
|
|
|
216
|
unless ($self->contains_base_args($opt) || $opt->name()) { |
47
|
0
|
|
|
|
|
0
|
$self->usage_error("Parameter 'name' required"); |
48
|
|
|
|
|
|
|
} |
49
|
3
|
|
|
|
|
71
|
return; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |