[Saltlake-pm] Fwd: LWP Packaging Weirdness
David Oswald
daoswald at gmail.com
Wed Apr 10 10:59:36 PDT 2013
As you mentioned, the don't physically exist within the libwww-perl
distribution, but have a look at the Makefile.PL for that
distribution:
https://github.com/libwww-perl/libwww-perl/blob/master/Makefile.PL
In specific, see lines 8-14:
GetOptions(\my %opt,
'aliases',
'no-programs|n',
'live-tests',
'jigsaw-tests',
) or do {
die "Usage: $0 [--aliases] [--no-programs] [--live-tests]
[--jigsaw-tests]\n";
};
...and then lines 21-28:
if ($opt{'aliases'} && grep(/lwp-request/, @prog)) {
require File::Copy;
for (qw(GET HEAD POST)) {
File::Copy::copy("bin/lwp-request", "bin/$_") || die "Can't
copy bin/$_";
chmod(0755, "bin/$_");
push(@prog, $_);
}
}
I don't much care for this sort of trick; in my opinion running
Makefile.PL should have only one effect; create a 'make' target called
'makefile'. There probably is a way to make the creation of these
files take place during the "make install" step, and it probably has
something to do with ExtUtils::MakeMaker's EXE_FILES attribute. The
problem is that ExtUtils::MakeMaker has grown so complex that even
"really good" Perl programmers end up just doing the work inside of
Makefile.PL rather than spend an afternoon fiddling with EU::MM.
On Wed, Apr 10, 2013 at 11:14 AM, Joseph Hall <perlhoser at gmail.com> wrote:
> Okay, this is driving me crazy. Those of you using LWP on Red Hat or
> Ubuntu will find the following files on your system:
>
> /usr/bin/HEAD
> /usr/bin/GET
> /usr/bin/POST
>
> Those of us running Arch will not find those. On Red Hat, you can find
> these attached to the perl-libwww-perl package:
>
> http://pastebin.com/wwt8c0x3
>
> If you investigate on Ubuntu, you will discover those files belonging
> to the libwww-perl package. But they don't belong to the perl-libwww
> package on Arch. So I started looking around upstream:
>
> https://github.com/libwww-perl/libwww-perl
> http://search.cpan.org/dist/libwww-perl/
>
> They just don't exist.
>
> You may notice that the pastebin above is for 5.837, and think that
> maybe those files were pulled from recent versions. But if you go back
> and browse CPAN and GitHub for those versions, you still won't find
> them.
>
> Where the foo are these files coming from?
>
> --
> "In order to create, you have to have the willingness, the desire to
> be challenged, to be learning." -- Ferran Adria (speaking at Harvard,
> 2011)
> _______________________________________________
> Saltlake-pm mailing list
> Saltlake-pm at pm.org
> http://mail.pm.org/mailman/listinfo/saltlake-pm
> http://saltlake.pm.org
--
David Oswald
daoswald at gmail.com
More information about the Saltlake-pm
mailing list