| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
324011
|
use 5.010001; |
|
|
1
|
|
|
|
|
12
|
|
|
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
20
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Mite::Miteception -all; |
|
6
|
1
|
|
|
1
|
|
313
|
|
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
|
8
|
|
|
|
|
|
|
our $VERSION = '0.010008'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use File::Find; |
|
11
|
1
|
|
|
1
|
|
24
|
use autodie; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
79
|
|
|
12
|
1
|
|
|
1
|
|
5
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
|
|
{ |
|
14
|
|
|
|
|
|
|
package # hide from indexer |
|
15
|
|
|
|
|
|
|
MY; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $self = shift; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
|
|
my $make = $self->SUPER::top_targets; |
|
20
|
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
# Hacky way to run the mite target before pm_to_blib. |
|
22
|
|
|
|
|
|
|
$make =~ s{(pure_all \s* ::? .*) (pm_to_blib)}{$1 mite $2}x; |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $make; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
0
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $self = shift; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $mite = $ENV{MITE} || 'mite'; |
|
30
|
0
|
|
|
0
|
|
|
|
|
31
|
|
|
|
|
|
|
return sprintf <<'MAKE', $mite; |
|
32
|
0
|
|
0
|
|
|
|
MITE=%s |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
mite :: |
|
35
|
|
|
|
|
|
|
- $(MITE) compile --exit-if-no-mite-dir --no-search-mite-dir |
|
36
|
|
|
|
|
|
|
- $(ABSPERLRUN) -MMite::MakeMaker -e 'Mite::MakeMaker->fix_pm_to_blib(@ARGV);' lib $(INST_LIB) |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
clean :: |
|
39
|
|
|
|
|
|
|
- $(MITE) clean --exit-if-no-mite-dir --no-search-mite-dir |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
MAKE |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
signature_for fix_pm_to_blib => ( |
|
46
|
|
|
|
|
|
|
pos => [ Path, Path ], |
|
47
|
|
|
|
|
|
|
); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my ( $self, $from_dir, $to_dir ) = @_; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
find({ |
|
52
|
|
|
|
|
|
|
wanted => sub { |
|
53
|
|
|
|
|
|
|
# Not just the mite files, but also the mite shim. |
|
54
|
|
|
|
|
|
|
return if -d $_ || !m{\.pm$}; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $src = Path::Tiny::path($File::Find::name); |
|
57
|
|
|
|
|
|
|
my $dst = change_parent_dir($from_dir, $to_dir, $src); |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
say "Copying $src to $dst"; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$dst->parent->mkpath; |
|
62
|
|
|
|
|
|
|
$src->copy($dst); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
return; |
|
65
|
|
|
|
|
|
|
}, |
|
66
|
|
|
|
|
|
|
no_chdir => 1 |
|
67
|
|
|
|
|
|
|
}, $from_dir); |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
return; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
signature_for change_parent_dir => ( |
|
73
|
|
|
|
|
|
|
method => false, |
|
74
|
|
|
|
|
|
|
pos => [ Path, Path, Path ], |
|
75
|
|
|
|
|
|
|
); |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
my ( $old_parent, $new_parent, $file ) = @_; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
return $new_parent->child( $file->relative($old_parent) ); |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 NAME |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Mite::MakeMaker - use in your Makefile.PL when developing with Mite |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
# In Makefile.PL |
|
92
|
|
|
|
|
|
|
use ExtUtils::MakeMaker; |
|
93
|
|
|
|
|
|
|
eval { require Mite::MakeMaker; }; |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
WriteMakefile( |
|
96
|
|
|
|
|
|
|
...as normal... |
|
97
|
|
|
|
|
|
|
); |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
If your module is being developed with L<ExtUtils::MakeMaker>, this |
|
102
|
|
|
|
|
|
|
module makes working with L<Mite> more natural. |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Be sure to C<require> this in an C<eval> block so users can install |
|
105
|
|
|
|
|
|
|
your module without mite. |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head3 C<make> |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
When C<make> is run, mite will compile any changes. |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head3 C<make clean> |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
When C<make clean> is run, mite files will be cleaned up as well. |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head3 C<make manifest> |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Be sure to run this after running C<make> and before running C<make |
|
118
|
|
|
|
|
|
|
dist> so all the mite files are picked up. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head3 F<MANIFEST.SKIP> |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
The F<.mite> directory should not be shipped with your distribution. |
|
123
|
|
|
|
|
|
|
Add C<^\.mite/> to your F<MANIFEST.SKIP> file. |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 BUGS |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Please report any bugs to L<https://github.com/tobyink/p5-mite/issues>. |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
L<Mite::ModuleBuild> |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 AUTHOR |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Michael G Schwern E<lt>mschwern@cpan.orgE<gt>. |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Toby Inkster E<lt>tobyink@cpan.orgE<gt>. |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
This software is copyright (c) 2011-2014 by Michael G Schwern. |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Toby Inkster. |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
146
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
|
151
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
|
152
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |