line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Build::Mojolicious; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
14959
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
7
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
3
|
use File::Spec; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
10
|
1
|
|
|
1
|
|
2000
|
use Module::Build; |
|
1
|
|
|
|
|
88362
|
|
|
1
|
|
|
|
|
260
|
|
11
|
|
|
|
|
|
|
our @ISA = 'Module::Build'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $Clean_Install = 0; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
2
|
|
|
2
|
|
423
|
my $class = shift; |
17
|
2
|
50
|
|
|
|
9
|
my %args = ref $_[0] ? %{ shift() } : @_; |
|
0
|
|
|
|
|
0
|
|
18
|
|
|
|
|
|
|
|
19
|
2
|
100
|
|
|
|
8
|
if (defined $args{clean_install}) { |
20
|
1
|
|
|
|
|
3
|
$Clean_Install = $args{clean_install}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
2
|
100
|
|
|
|
1472
|
if ($Clean_Install) { |
24
|
1
|
|
|
|
|
273
|
require Module::Build::CleanInstall; |
25
|
0
|
|
|
|
|
|
@ISA = 'Module::Build::CleanInstall'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub share_dir { |
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
my $share_dir = $self->SUPER::share_dir(@_); |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
unless ( $self->notes( 'mojolicious_added' ) ) { |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
my $path = File::Spec->catdir( |
36
|
|
|
|
|
|
|
$self->base_dir, 'lib', split( /::/, $self->module_name ), 'files' |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
return $share_dir unless -d $path; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
push @{ $share_dir->{dist} }, $path; |
|
0
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
$self->SUPER::share_dir($share_dir); |
43
|
0
|
|
|
|
|
|
$self->notes( mojolicious_file_path => $path ); |
44
|
0
|
|
|
|
|
|
$self->notes( mojolicious_added => 1 ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $share_dir; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Module::Build::Mojolicious |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SYNOPSIS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# Build.PL |
60
|
|
|
|
|
|
|
use Module::Build::Mojolicious clean_install => 1; |
61
|
|
|
|
|
|
|
my $builder = Module::Build::Mojolicious->new( |
62
|
|
|
|
|
|
|
configure_requires => { |
63
|
|
|
|
|
|
|
'Module::Build::Mojolicious' => 0, |
64
|
|
|
|
|
|
|
'Module::Build' => 0.38, |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
... |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
$builder->create_build_script; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
A subclass of L for use with L. See L for more documentation. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Note that you should add it to the C key as you should for any module used in a C file. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 OPTIONS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
If imported with the option C<< clean_install => 1 >>, L will be inserted into the inheritance tree at import time. This module ensures that old files are removed before upgrading an already installed module. The author recommends this option be enabled. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SOURCE REPOSITORY |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Joel Berger, Ejoel.a.berger@gmail.comE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Copyright (C) 2012 by Joel Berger |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
93
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|