Click here to get back home

CPAN tool problems, Windows XP

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
CPAN tool problems, Windows XP Chris 11-06-2006
Posted by harryfmudd [AT] comcast [DOT] on November 9, 2006, 10:42 am
Please log in for more thread options


Chris wrote:
> harryfmudd [AT] comcast [DOT] net wrote:
>
>
>>...
>>
>>Are you behind a proxy server? If you are, you will need to correctly
>>configure LWP::UserAgent and/or define environment variable HTTP_PROXY
>>and/or FTP_PROXY to point to the correct server and port. This will need
>>to be done even if you use ppm.
>
>
> I'm not quite sure whether I'm behind a proxy server. I have a
> wireless router that presents one IP address to the outside world, and
> another to machines inside my house. Is THAT a proxy server?
>

No. If you were behind a proxy server you would have to connect to it
rather than the world at large.

> Is it significant that I just tried PPM and it works?

Yes. If PPM worked without defining www_proxy it means you are not
behind a proxy server.

>
> How do I "configure LWP::UserAgent"? I must have missed the doc (if
> any) on how to do that.
>

I think I was confused when I said that. When I was composing my reply I
thought I remembered going through a configuration that asked me to
tell it about (among other things) proxy servers. But I believe now that
that's the CPAN configuration, because I can't find any configuration
docs for LWP::UserAgent either. The LWP docs tell about the environment
variables.

>
>>My opinion is that CPAN does not work very well under Windows (and that
>>includes cygwin) because Windows won't let you replace a DLL that is in
>>use. [...]
>
>
> So you're saying that the CPAN module tries to replace DLLs that Perl
> uses. Hadn't thought of that. Haven't gotten far enough for that to
> be an issue, yet, actually. :-P So I'd guess this would affect PPM
> as well as CPAN?
>

Well, ActivePerl seems to have solved this problem somehow - maybe by
restricting the modules used by ppm, making those part of their core,
and then not updating them other than by making you install a new Perl.

Judging by what happened when I added Module::Build support to some of
my packages, they're using a fairly old version of ExtUtils::MakeMaker,
and I suspect you'll find the Cwd a couple revisions behind CPAN as well.

Tom Wyant

Posted by Chris on November 16, 2006, 7:41 pm
Please log in for more thread options



harryfmudd [AT] comcast [DOT] net wrote:
> Chris wrote:
> > harryfmudd [AT] comcast [DOT] net wrote:
> >
> > wireless router ... Is THAT a proxy server?
> >
> No. If you were behind a proxy server you would have to connect to it
> rather than the world at large.

Thanks; now I'll know what to tell the next person (or program) that
asks!

> > Is it significant that I just tried PPM and it works?
>
> Yes. If PPM worked without defining www_proxy it means you are not
> behind a proxy server.

I may have been premature when I said that it "worked," but maybe it
depends on your definition of "worked." It definitely picked up, and
installed, a version of Win32::GUI ... but I had problems getting it to
work, went to CPAN, couldn't make sense of what was available there,
got in touch with the author (Robert May), ended up getting on his
Win32-users mailing list, and have determined that PPM probably picked
up a way-old PPM package? module? whatever from the
not-recently-updated ActiveState repository.

So now I'm up against trying to find a more "current" one, -or-
contrive to build it from scratch. I don't have any more time to spend
on it right now, either way, so am going to have to take another run at
it sometime later.

> > How do I "configure LWP::UserAgent"? I must have missed the doc (if
> > any) on how to do that.
>
> I think I was confused when I said that. When I was composing my reply I
> thought I remembered going through a configuration that asked me to
> tell it about (among other things) proxy servers. But I believe now that
> that's the CPAN configuration, because I can't find any configuration
> docs for LWP::UserAgent either. The LWP docs tell about the environment
> variables.

Yeah, I see some blatherings about LWP when I try to use the CPAN
module.

> >>My opinion is that CPAN does not work very well under Windows ...

Others -- e.g. Robert May :-) -- agree with you on this.

> Judging by what happened when I added Module::Build support to some of
> my packages, they're using a fairly old version of ExtUtils::MakeMaker,
> and I suspect you'll find the Cwd a couple revisions behind CPAN as well.

Whew. I'm sufficiently new-and-inexperienced at all this, that I'm not
really familiar with Module::Build, ExtUtils::MakeMaker, and/or "the
Cwd." Care to explain, either here or (so as not to bore people who
already know it) via e-mail?

Thanks again,

Chris


Posted by harryfmudd [AT] comcast [DOT] on November 17, 2006, 2:45 pm
Please log in for more thread options


Chris wrote:

<snip content="discussion of proxy servers" />

>
> So now I'm up against trying to find a more "current" one, -or-
> contrive to build it from scratch. I don't have any more time to spend
> on it right now, either way, so am going to have to take another run at
> it sometime later.
>
>

You'll need at least nmake. My crib notes say you can get it from
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe but there may well
be more current versions available. Some modules need a "C" compiler. If
you look in a module and it contains file names ending in ".xs", you
need one. Once upon a time it was Visual C++ or nothing, but I have
heard (on this newsgroup) that MinGW also works, and is much cheaper.

<snip content="configuring CPAN (somewhat confused)" />

>
> Whew. I'm sufficiently new-and-inexperienced at all this, that I'm not
> really familiar with Module::Build, ExtUtils::MakeMaker, and/or "the
> Cwd." Care to explain, either here or (so as not to bore people who
> already know it) via e-mail?
>

The canonical way to build a Perl module looks something like this:

gunzip module.tar.gz
tar -xf module.tar
cd module
perl Makefile.PL
make
make test
make install

(other things might appear instead of 'make' - e.g. 'nmake' under
Windows, 'mmk' under VMS, or whatever).

Yes, you can use WinZip for the first two steps. And at least some tars
let you skip the 'gunzip' in favor or

tar -xzf module.tar.gz

but that's kind of tangential to our discussion.

The only thing Makefile.PL is really required to do is do some
requirements checking and generate a file named 'Makefile', or whatever
the make utility wants. But makefiles are complicated, so it's usual for
Makefile.PL to delegate its dirty work to a Perl module called
ExtUtils::MakeMaker. This gets installed when you install Perl, so it's
pretty well guaranteed to be there, and is pretty much the standard way
for a module author to get his or her module installed.

But ExtUtils::MakeMaker needs external programs (e.g. at least 'make')
to get its job done. Because Perl is perfectly capable of doing the job
'make' gets used for, another build system called Module::Build arose,
which minimizes the need for external programs (except for compilers, of
course). Modules which use Module::Build are built using a slightly
different canonical incantation:

gunzip module.tar.gz
tar -xf module.tar
cd module
perl Build.PL
./Build
./Build test
./Build install

When the author provides both build systems there can be problems,
because older versions of ExtUtils::MakeMaker assume that any file named
*.PL needs to be run, which causes errors if the module author provides
a Build.PL buit Module::Build is not installed. Newer versions of
ExtUtils::MakeMaker are smart enough to deal with this, but older
versions have to be told "don't run any .PL files".

Cwd is something else altogether. It's the module that fetches the name
of the current directory. It also provides functionality to convert a
path name to absolute. This module is part of the Perl core, but gets
updated occasionally on its own. ActiveState, however, considers it part
of the core and lets it go at that, since it requires a dll (i.e. it's
one of those .xs modules I talked about earlier) and is hard to replace.

ActivePerl installs the Perl documentation as browsable HTML. You should
look into it for more on (at least) Cwd, and probably ExtUtils::MakeMaker.

Tom Wyant

Similar ThreadsPosted
Problems with forked packages and CPAN March 30, 2006, 1:53 pm
Archive::zip is how fast compared to the zip tool? October 10, 2005, 11:07 am
Availability of a tool for database contents reporting September 7, 2004, 9:41 pm
Need Perl/CGI Programmer for Shopping Cart/E-commerce Tool March 23, 2005, 2:36 pm
Make, Rake like tool in pure perl. I need feedback. July 5, 2008, 5:46 am
Upgrading to CPAN.pm v1.76 install Bundle::CPAN fails May 10, 2005, 9:51 pm
Use CPAN or CPAN::Shell for LOCAL ONLY install from tarballs? May 9, 2008, 1:04 pm
Where to get DBD::pg for Windows? January 12, 2005, 1:02 pm
Net::SFTP on Windows March 21, 2005, 9:55 pm
Windows: Perl:XS July 6, 2005, 4:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap