Debian Codegraph @

Makefile.PL

raw
1 require 5.00503;
2 use strict;
3 use ExtUtils::MakeMaker;
4
5 use lib qw( ./lib );
6
7 $| = 1;
8
9 $ENV{PERL_JSON_BACKEND} = 'JSON::backportPP';
10 eval q| require JSON |;
11
12 if ($@) {
13 print "Loading lib/JSON.pm failed. No B module?\n";
14 print "perl says : $@";
15 print "Setting environmental variable 'PERL_DL_NONLAZY' to 0 may help.\n";
16 print "No Makefile created.\n";
17 exit 0;
18 }
19
20
21 my $version = JSON->VERSION;
22
23 print <<EOF;
24 Welcome to JSON (v.$version)
25 =============================
26
27 ** BACKWARD INCOMPATIBILITY **
28
29 Since version 2.90, stringification (and string comparison) for
30 JSON::true and JSON::false has not been overloaded. It shouldn't
31 matter as long as you treat them as boolean values, but a code that
32 expects they are stringified as "true" or "false" doesn't work as
33 you have expected any more.
34
35 if (JSON::true eq 'true') { # now fails
36
37 print "The result is $JSON::true now."; # => The result is 1 now.
38
39 And now these boolean values don't inherit JSON::Boolean, either.
40 When you need to test a value is a JSON boolean value or not, use
41 JSON::is_bool function, instead of testing the value inherits
42 a particular boolean class or not.
43
44 EOF
45
46
47 WriteMakefile(
48 'NAME' => 'JSON',
49 'VERSION_FROM' => 'lib/JSON.pm', # finds $VERSION
50 'ABSTRACT_FROM' => 'lib/JSON.pm', # retrieve abstract from module
51 'AUTHOR' => 'Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>',
52 'PREREQ_PM' => {
53 'Test::More' => 0,
54 },
55 ( $ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE' => 'perl', ) : () ),
56
57 ( $ExtUtils::MakeMaker::VERSION >= 6.46 ? (
58 'META_MERGE' => {
59 resources => {
60 repository => 'https://github.com/makamaka/JSON',
61 bugtracker => 'https://github.com/makamaka/JSON/issues',
62 },
63 recommends => {
64 'JSON::XS' => JSON->require_xs_version,
65 },
66 } ) : ()
67 ),
68 );
69
70
71 if ($] < 5.006) { # I saw to http://d.hatena.ne.jp/asakusabashi/20051231/p1
72 open(IN, "Makefile");
73 open(OUT,">Makefile.tmp") || die;
74 while(<IN>) {
75 s/PERL_DL_NONLAZY=1//g;
76 print OUT;
77 }
78 close(OUT);
79 close(IN);
80 rename("Makefile.tmp" => "Makefile");
81 }