On Jan 30, 2010, at 4:32 AM, Eric Robertson wrote:
Hello,
We are using your recent update of open source curl for OpenVMS as
part of a utility for automating the download of a data file from a
website using OpenVMS Alpha V8.3. We have a perl script that makes
use of curl that runs on OpenSUSE Linux 11.2 and we wanted to use
that script on OpenVMS Alpha using perl V5.8.6. However, the OpenVMS
version of perl does not come with curl extension for perl and so
the the curl extension module needs to be installed after the
installation of perl. We installed (and successfully tested) the
version of curl for OpenVMS that we installed. But when I attempted
to install the curl extension module for perl by running the
supplied Makefile.PL script (downloaded as part of the WWW::Curl
package from the CPAN web site), I get the following error message:
Can't locate Module/Install/Admin.pm in @INC (@INC contains: /
perl_root/lib/VMS_AXP/5_8_6 perl_root:[lib] perl_root:
[lib.site_perl.VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/
site_perl .) at inc/Module/Install.pm line 160.
BEGIN failed--compilation aborted at Makefile.PL line 4.
%SYSTEM-W-NOSUCHFILE, no such file
The file Admin.pm does not exist anywhere in the perl installation
directory tree and I was not able to find any information about how
to download it or produce it from source. Has anyone else tried to
do this using perl on OpenVMS or do you know anybody who might know
something about this?
Thanks in advance for any wisdom,
The short answer is that Module::Install is a broken implementation of
a wretched, fragile design. The longer answer involves sorting out
what it's trying to do and why it can't do it.
Module::Install is a convenience wrapper around other extension
building packages. Nothing wrong with that in and of itself, but it
does its thing by embedding a copy of itself under the [.inc]
directory of each and every module that uses it (design flaw #1).
I believe the particular error message you are seeing indicates that
it is unable to locate the [.inc] directory in your WWW::Curl package
(broken implementation detail #1). When that happens, it assumes you
are the module author and simply haven't created that directory yet,
so it tries to fire up Module::Install::Admin (the Author-side
manager for Module::Install) and create and populate that directory
for your module (design flaw #2).
Module::Install::Admin exists at http://search.cpan.org/~adamk/Module-Install-0.92/lib/Module/Install/Admin.pm
but you shouldn't need that and acquiring it would be unlikely to
help with your problem. Even if Module::Install::Admin successfully
re-created the [.inc] directory, Module::Install would probably still
be unable to locate it and you'd be right back where you are now. So
rather than warning you that it can't find [.inc] (a warning you might
be able to act on), it tries to take an automatic action on your
behalf that is never the right thing for an end user and fails
mysteriously.
Finding and fixing Module::Install's ability to locate the [.inc] or
inc/ directory is probably the best way forward. I'm pretty sure I've
done that one or more times but they keep breaking it. The problem
with fixing it is not only that it doesn't stay fixed but that it
doesn't do any good for the end user of module XYZ until the author of
module XYZ re-embeds a fixed version of Module::Install. I think
Module::Install is supposed to know how to upgrade itself on the fly,
but if it can even load itself, then it's embedded a horrible
bootstrapping problem in the place where it's most difficult to do
something about it (massive design failure #3).
All of this is in the name of making installation easier. Maybe it
does that when it works. When it doesn't work, it's a complete mess.
I've more than once thrown away the Makefile.PL and written a new one
(that doesn't use Module::Install) from scratch and that is another
option here as well if you don't want to delve into [.inc] and figure
out what's in there that can't even locate the directory it's in.
Based on the Changes file at http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.11/Changes
, WWW::Curl did not start using Module::Install until version 4.0,
so you could grab a Makefile.PL from before that to use as a basis for
one that could build the current version.
Craig A. Berry
mailto:craigbe...@mac.com
... getting out of a sonnet is much more
difficult than getting in.
Brad Leithauser