line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::Profile::XS; |
2
|
1
|
|
|
1
|
|
968
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
23
|
use parent qw(Minilla::Profile::ModuleBuild); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
58
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
8
|
1
|
|
|
1
|
|
6
|
use File::Basename qw(dirname); |
|
1
|
|
|
|
|
115
|
|
|
1
|
|
|
|
|
48
|
|
9
|
1
|
|
|
1
|
|
89
|
use Data::Section::Simple qw(get_data_section); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
44
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use Minilla::Gitignore; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
12
|
1
|
|
|
1
|
|
4
|
use Minilla::Util qw(require_optional); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
13
|
1
|
|
|
1
|
|
5
|
use Minilla::Logger; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
359
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub module_pm_src { |
16
|
0
|
|
|
0
|
0
|
|
join("\n", |
17
|
|
|
|
|
|
|
'use XSLoader;', |
18
|
|
|
|
|
|
|
'XSLoader::load(__PACKAGE__, $VERSION);' |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub generate { |
23
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
require_optional( 'Devel/PPPort.pm', 'PPPort is required for XS support' ); |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$self->render('Module.pm', catfile('lib', $self->path)); |
28
|
0
|
|
|
|
|
|
$self->render('Module.xs', catfile('lib', dirname($self->path), $self->suffix . '.xs')); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $ppport = catfile(dirname(catfile('lib', $self->path)), 'ppport.h'); |
31
|
0
|
|
|
|
|
|
infof("Writing ppport.h: %s\n", $ppport); |
32
|
0
|
|
|
|
|
|
Devel::PPPort::WriteFile($ppport); |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
$self->render('Changes'); |
35
|
0
|
|
|
|
|
|
$self->render('t/00_compile.t'); |
36
|
0
|
|
|
|
|
|
$self->render('t/01_simple.t'); |
37
|
0
|
|
|
|
|
|
$self->render('github_actions_test.yml', catfile('.github', 'workflows', 'test.yml')); |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
$self->render('.gitignore'); |
40
|
0
|
|
|
|
|
|
my $gi = Minilla::Gitignore->load('.gitignore'); |
41
|
0
|
|
|
|
|
|
$gi->add(catfile('lib', dirname($self->path), $self->suffix . '.c')); |
42
|
0
|
|
|
|
|
|
$gi->add("!$ppport"); # Import ppport.h! |
43
|
0
|
|
|
|
|
|
$gi->save('.gitignore'); |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
$self->write_file('LICENSE', Minilla::License::Perl_5->new( |
46
|
|
|
|
|
|
|
holder => sprintf('%s <%s>', $self->author, $self->email) |
47
|
|
|
|
|
|
|
)->fulltext); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
$self->render('cpanfile'); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__DATA__ |