| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
592
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
27
|
|
|
2
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
46
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package ExtUtils::MakeMaker::JSONMETA; |
|
5
|
|
|
|
|
|
|
our $VERSION = '7.001'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1049
|
use ExtUtils::MM_Any; |
|
|
1
|
|
|
|
|
100301
|
|
|
|
1
|
|
|
|
|
40
|
|
|
8
|
1
|
|
|
1
|
|
12
|
use JSON 2; |
|
|
1
|
|
|
|
|
28
|
|
|
|
1
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
ExtUtils::MakeMaker::JSONMETA - (deprecated) write META.json instead of META.yml |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
B This library will soon be obsolete as EUMM moves to use the |
|
17
|
|
|
|
|
|
|
official L JSON files. |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
In your Makefile.PL: |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use ExtUtils::MakeMaker; |
|
22
|
|
|
|
|
|
|
eval { require ExtUtils::MakeMaker::JSONMETA; }; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
WriteMakefile(...); |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
If EU::MM::JSONMETA cannot be loaded (for example, because a user who is |
|
27
|
|
|
|
|
|
|
installing your module does not have it or JSON installed), things will |
|
28
|
|
|
|
|
|
|
continue as usual. If it can be loaded, a META.json file will be produced, |
|
29
|
|
|
|
|
|
|
containing JSON. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
193
|
no warnings qw(once redefine); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
317
|
|
|
34
|
|
|
|
|
|
|
my $orig_m_t = ExtUtils::MM_Any->can('metafile_target'); |
|
35
|
|
|
|
|
|
|
*ExtUtils::MM_Any::metafile_target = sub { |
|
36
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
37
|
0
|
|
|
|
|
|
my $output = $self->$orig_m_t(@_); |
|
38
|
0
|
|
|
|
|
|
$output =~ s{META\.yml}{META.json}g; |
|
39
|
0
|
|
|
|
|
|
return $output; |
|
40
|
|
|
|
|
|
|
}; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
*ExtUtils::MM_Any::metafile_file = sub { |
|
43
|
0
|
|
|
0
|
|
|
my ($self, %pairs) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
$pairs{generated_by} = join ' version ', __PACKAGE__, __PACKAGE__->VERSION; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return JSON->new->ascii(1)->pretty->encode(\%pairs) . "\n"; |
|
48
|
|
|
|
|
|
|
}; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $orig_d_t = ExtUtils::MM_Any->can('distmeta_target'); |
|
51
|
|
|
|
|
|
|
*ExtUtils::MM_Any::distmeta_target = sub { |
|
52
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
53
|
0
|
|
|
|
|
|
my $output = $self->$orig_d_t(@_); |
|
54
|
0
|
|
|
|
|
|
$output =~ s{META\.yml}{META.json}g; |
|
55
|
0
|
|
|
|
|
|
return $output; |
|
56
|
|
|
|
|
|
|
}; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR AND COPYRIGHT |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Copyright (C) 2009, Ricardo Signes, C |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is free software, distributed under the same terms as perl5. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |