line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Build::Mojolicious; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
35190
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
7
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
1241
|
use Module::Build; |
|
1
|
|
|
|
|
210410
|
|
|
1
|
|
|
|
|
561
|
|
11
|
|
|
|
|
|
|
our @ISA = 'Module::Build'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $Clean_Install = 0; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
2
|
|
|
2
|
|
517
|
my $class = shift; |
17
|
2
|
50
|
|
|
|
13
|
my %args = ref $_[0] ? %{ shift() } : @_; |
|
0
|
|
|
|
|
0
|
|
18
|
|
|
|
|
|
|
|
19
|
2
|
100
|
|
|
|
10
|
if (defined $args{clean_install}) { |
20
|
1
|
|
|
|
|
4
|
$Clean_Install = $args{clean_install}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
2
|
100
|
|
|
|
2434
|
if ($Clean_Install) { |
24
|
1
|
|
|
|
|
1395
|
require Module::Build::CleanInstall; |
25
|
1
|
|
|
|
|
187041
|
@ISA = 'Module::Build::CleanInstall'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub share_dir { |
30
|
2
|
|
|
2
|
0
|
82947
|
my $self = shift; |
31
|
2
|
|
|
|
|
191
|
my $share_dir = $self->SUPER::share_dir(@_); |
32
|
|
|
|
|
|
|
|
33
|
2
|
100
|
|
|
|
86
|
unless ( $self->notes( 'mojolicious_added' ) ) { |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
73
|
my $path = File::Spec->catdir( |
36
|
|
|
|
|
|
|
$self->base_dir, 'lib', split( /::/, $self->module_name ), 'files' |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
1
|
50
|
|
|
|
79
|
return $share_dir unless -d $path; |
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
5
|
push @{ $share_dir->{dist} }, $path; |
|
1
|
|
|
|
|
7
|
|
42
|
1
|
|
|
|
|
11
|
$self->SUPER::share_dir($share_dir); |
43
|
1
|
|
|
|
|
23
|
$self->notes( mojolicious_file_path => $path ); |
44
|
1
|
|
|
|
|
150
|
$self->notes( mojolicious_added => 1 ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
190
|
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
|
|
|
|
|
|
|
|