Skip to content

Commit 07c524d

Browse files
committed
Strip down Makefile.PL to what HTTP-Daemon needs
1 parent c583cd4 commit 07c524d

1 file changed

Lines changed: 11 additions & 84 deletions

File tree

Makefile.PL

Lines changed: 11 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3,108 +3,35 @@
33
require 5.008008;
44
use strict;
55
use ExtUtils::MakeMaker;
6-
use Getopt::Long qw(GetOptions);
7-
8-
GetOptions(\my %opt,
9-
'aliases',
10-
'no-programs|n',
11-
'live-tests',
12-
) or do {
13-
die "Usage: $0 [--aliases] [--no-programs] [--live-tests]\n";
14-
};
15-
16-
my @prog;
17-
push(@prog, qw(lwp-request lwp-mirror lwp-download lwp-dump))
18-
unless $opt{'no-programs'} || grep /^LIB=/, @ARGV;
19-
20-
if ($opt{'aliases'} && grep(/lwp-request/, @prog)) {
21-
require File::Copy;
22-
for (qw(GET HEAD POST)) {
23-
File::Copy::copy("bin/lwp-request", "bin/$_") || die "Can't copy bin/$_";
24-
chmod(0755, "bin/$_");
25-
push(@prog, $_);
26-
}
27-
}
28-
29-
system($^X, "talk-to-ourself");
30-
flag_file("t/CAN_TALK_TO_OURSELF", $? == 0);
31-
flag_file("t/live/ENABLED", $opt{'live-tests'});
326

337
WriteMakefile(
34-
NAME => 'LWP',
35-
DISTNAME => 'libwww-perl',
36-
VERSION_FROM => 'lib/LWP.pm',
37-
ABSTRACT => 'The World-Wide Web library for Perl',
8+
NAME => 'HTTP::Daemon',
9+
VERSION_FROM => 'lib/HTTP/Daemon.pm',
10+
ABSTRACT_FROM => 'lib/HTTP/Daemon.pm',
3811
AUTHOR => 'Gisle Aas <gisle@activestate.com>',
39-
EXE_FILES => [ map "bin/$_", @prog ],
4012
LICENSE => "perl",
4113
MIN_PERL_VERSION => 5.008008,
4214
PREREQ_PM => {
43-
'URI' => "1.10",
44-
'MIME::Base64' => "2.1",
45-
'Net::FTP' => "2.58",
46-
'HTML::Tagset' => 0,
47-
'HTML::Parser' => "3.33",
48-
'Digest::MD5' => 0,
49-
'Encode' => "2.12",
50-
'Encode::Locale' => 0.02,
51-
'Compress::Raw::Zlib' => 0,
52-
'IO::Compress::Gzip' => 0,
53-
'IO::Compress::Deflate' => 0,
54-
'IO::Uncompress::Gunzip' => 0,
55-
'IO::Uncompress::Inflate' => 0,
56-
'IO::Uncompress::RawInflate' => 0,
15+
'Sys::Hostname' => 0,
16+
'IO::Socket' => 0,
17+
'HTTP::Request' => 6,
18+
'HTTP::Response' => 6,
19+
'HTTP::Status' => 6,
20+
'HTTP::Date' => 6,
21+
'LWP::MediaTypes' => 6,
5722
},
5823
META_MERGE => {
59-
recommends => {
60-
'IO::Socket::SSL' => "1.38",
61-
'Mozilla::CA' => "20110101",
62-
},
6324
resources => {
6425
repository => 'http://github.com/gisle/libwww-perl',
6526
MailingList => 'mailto:libwww@perl.org',
6627
}
6728
},
68-
clean => { FILES => join(" ", map "bin/$_", grep /^[A-Z]+$/, @prog) },
6929
);
7030

71-
if($] >= 5.008 && !(eval { require Encode; defined(Encode::decode("UTF-8", "\xff")) })) {
72-
warn "\nYou lack a working Encode module, and so you will miss out on\n".
73-
"lots of character set goodness from LWP. However, your perl is\n".
74-
"sufficiently recent to support it. It is recommended that you\n".
75-
"install the latest Encode from CPAN.\n\n";
76-
}
77-
78-
79-
80-
sub MY::test
81-
{
82-
q(
83-
TEST_VERBOSE=0
84-
85-
test : pure_all
86-
$(FULLPERL) t/TEST $(TEST_VERBOSE)
87-
88-
test_hudson : pure_all
89-
$(FULLPERL) t/TEST $(TEST_VERBOSE) --formatter=TAP::Formatter::JUnit
90-
91-
);
92-
}
93-
94-
95-
sub flag_file {
96-
my($file, $create) = @_;
97-
if ($create) {
98-
open(my $fh, ">", $file) || die "Can't create $file: $!";
99-
}
100-
else {
101-
unlink($file);
102-
}
103-
}
10431

10532
BEGIN {
10633
# compatibility with older versions of MakeMaker
107-
my $developer = -f "NOTES.txt";
34+
my $developer = -f ".gitignore";
10835
my %mm_req = (
10936
LICENCE => 6.31,
11037
META_MERGE => 6.45,

0 commit comments

Comments
 (0)