| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Module::Starter::TOSHIOITO; |
|
2
|
1
|
|
|
1
|
|
25265
|
use 5.10.0; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
210
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
35
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
18
|
|
|
|
1
|
|
|
|
|
34
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use base "Module::Starter::Simple"; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1311
|
|
|
6
|
1
|
|
|
1
|
|
22425
|
use Carp; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
72
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
18
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use ExtUtils::Command qw(mkpath); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1186
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub create_distro { |
|
13
|
0
|
|
|
0
|
1
|
|
my $either = shift; |
|
14
|
0
|
0
|
|
|
|
|
$either = $either->new(@_) if !ref($either); |
|
15
|
0
|
|
|
|
|
|
my $self = $either; |
|
16
|
0
|
0
|
0
|
|
|
|
$self->{ignores_type} = [qw(git manifest)] if !$self->{ignores_type} || !@{$self->{ignores_type}}; |
|
|
0
|
|
|
|
|
|
|
|
17
|
0
|
|
0
|
|
|
|
$self->{verbose} //= 1; |
|
18
|
0
|
|
0
|
|
|
|
$self->{license} //= "perl"; |
|
19
|
0
|
0
|
|
|
|
|
if(!$self->{github_user_name}) { |
|
20
|
0
|
|
|
|
|
|
croak "github_user_name config parameter is mandatory"; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
0
|
|
|
|
|
|
return $self->SUPER::create_distro(); |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _github_repo_name { |
|
26
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
|
27
|
0
|
|
0
|
|
|
|
my $prefix = $self->{github_repo_prefix} || ""; |
|
28
|
0
|
|
0
|
|
|
|
my $postfix = $self->{github_repo_postfix} || ""; |
|
29
|
0
|
|
|
|
|
|
return "$prefix$self->{distro}$postfix"; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub Build_PL_guts { |
|
33
|
0
|
|
|
0
|
1
|
|
my ($self, $main_module, $main_pm_file) = @_; |
|
34
|
0
|
|
|
|
|
|
my $author = "$self->{author} <$self->{email}>"; |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $slname = $self->{license}; |
|
37
|
0
|
|
|
|
|
|
my $reponame = $self->_github_repo_name; |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return <<"HERE"; |
|
40
|
|
|
|
|
|
|
use $self->{minperl}; |
|
41
|
|
|
|
|
|
|
use strict; |
|
42
|
|
|
|
|
|
|
use warnings; |
|
43
|
|
|
|
|
|
|
use Module::Build; |
|
44
|
|
|
|
|
|
|
use Module::Build::Prereqs::FromCPANfile; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Module::Build->new( |
|
47
|
|
|
|
|
|
|
module_name => '$main_module', |
|
48
|
|
|
|
|
|
|
license => '$slname', |
|
49
|
|
|
|
|
|
|
dist_author => q{$author}, |
|
50
|
|
|
|
|
|
|
dist_version_from => '$main_pm_file', |
|
51
|
|
|
|
|
|
|
release_status => 'stable', |
|
52
|
|
|
|
|
|
|
add_to_cleanup => [ '$self->{distro}-*' ], |
|
53
|
|
|
|
|
|
|
recursive_test_files => 1, |
|
54
|
|
|
|
|
|
|
dynamic_config => 1, |
|
55
|
|
|
|
|
|
|
(-d "share") ? (share_dir => "share") : (), |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
mb_prereqs_from_cpanfile(), |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
no_index => { |
|
60
|
|
|
|
|
|
|
directory => ["t", "xt", "eg", "inc", "share"], |
|
61
|
|
|
|
|
|
|
file => ['README.pod', 'README.md'], |
|
62
|
|
|
|
|
|
|
}, |
|
63
|
|
|
|
|
|
|
meta_add => { |
|
64
|
|
|
|
|
|
|
'meta-spec' => { |
|
65
|
|
|
|
|
|
|
version => 2, |
|
66
|
|
|
|
|
|
|
url => 'https://metacpan.org/pod/CPAN::Meta::Spec', |
|
67
|
|
|
|
|
|
|
}, |
|
68
|
|
|
|
|
|
|
resources => { |
|
69
|
|
|
|
|
|
|
bugtracker => { |
|
70
|
|
|
|
|
|
|
web => 'https://github.com/$self->{github_user_name}/$reponame/issues', |
|
71
|
|
|
|
|
|
|
}, |
|
72
|
|
|
|
|
|
|
repository => { |
|
73
|
|
|
|
|
|
|
url => 'git://github.com/$self->{github_user_name}/$reponame.git', |
|
74
|
|
|
|
|
|
|
web => 'https://github.com/$self->{github_user_name}/$reponame', |
|
75
|
|
|
|
|
|
|
}, |
|
76
|
|
|
|
|
|
|
} |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
)->create_build_script(); |
|
79
|
|
|
|
|
|
|
HERE |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub create_Build_PL { |
|
83
|
0
|
|
|
0
|
1
|
|
my ($self, $main_module) = @_; |
|
84
|
0
|
|
|
|
|
|
my $result = $self->SUPER::create_Build_PL($main_module); |
|
85
|
0
|
|
|
|
|
|
$self->_create_file_relative("cpanfile", <<'HERE'); |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
on 'test' => sub { |
|
88
|
|
|
|
|
|
|
requires 'Test::More' => "0"; |
|
89
|
|
|
|
|
|
|
}; |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
on 'configure' => sub { |
|
92
|
|
|
|
|
|
|
requires 'Module::Build', '0.42'; |
|
93
|
|
|
|
|
|
|
requires 'Module::Build::Prereqs::FromCPANfile', "0.02"; |
|
94
|
|
|
|
|
|
|
}; |
|
95
|
|
|
|
|
|
|
HERE |
|
96
|
0
|
|
|
|
|
|
$self->_create_file_relative(".travis.yml", <<'HERE'); |
|
97
|
|
|
|
|
|
|
language: perl |
|
98
|
|
|
|
|
|
|
perl: |
|
99
|
|
|
|
|
|
|
- "5.10" |
|
100
|
|
|
|
|
|
|
- "5.12" |
|
101
|
|
|
|
|
|
|
- "5.14" |
|
102
|
|
|
|
|
|
|
- "5.16" |
|
103
|
|
|
|
|
|
|
- "5.18" |
|
104
|
|
|
|
|
|
|
- "5.20" |
|
105
|
|
|
|
|
|
|
before_install: "cpanm --quiet `cpanfile-dump --no-build --no-test --no-runtime`" |
|
106
|
|
|
|
|
|
|
HERE |
|
107
|
0
|
|
|
|
|
|
return $result; |
|
108
|
|
|
|
|
|
|
} |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub module_guts { |
|
111
|
0
|
|
|
0
|
1
|
|
my ($self, $module, $rtname) = @_; |
|
112
|
0
|
|
|
|
|
|
my $reponame = $self->_github_repo_name; |
|
113
|
0
|
|
|
|
|
|
my $username = $self->{github_user_name}; |
|
114
|
0
|
|
|
|
|
|
my $license = $self->_module_license($module, $rtname); |
|
115
|
0
|
|
|
|
|
|
my $bug_email = "bug-$self->{distro} at rt.cpan.org"; |
|
116
|
|
|
|
|
|
|
return <<"HERE" |
|
117
|
|
|
|
|
|
|
package $module; |
|
118
|
|
|
|
|
|
|
use strict; |
|
119
|
|
|
|
|
|
|
use warnings; |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
our \$VERSION = "0.01"; |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |
|
124
|
|
|
|
|
|
|
__END__ |