On 6/25/07, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote:

I'm trying to use the CPAN shell to install some modules from our
internal CPAN mirror.
I'm using a URL of the form ftp://MyCpanMirror/u02/CPAN/ , and I have a
valid .netrc configured with a user and password for the mirror box.

At first I was able to query/install modules easily, but then I did an
"install Bundle::CPAN", and now I can't log into my CPAN mirror. To be
specific, LWP and Net::FTP are attempting to use an anonymous login,
which is not allowed, instead of trying to log in via the user
information contained in .netrc.

Sounds like somebody goofed, and assumed that all CPAN mirrors allow
anonymous access. You probably need to file a bug report, but let's
see how far we can get first.

It's undocumented, but maybe try this:

 BEGIN { $CPAN::DEBUG = 512; } # FTP?

I've read the docs for CPAN, LWP::UserAgent, and Net::FTP, but I don't
see how to change this behavior. I was under the impression that if a
.netrc was available, Net::FTP at least, would use it for
authentication.

That's my impression as well. Does Net::Netrc work for you from the
command line, maybe something like this?

 perl -MNet::Netrc -lwe 'print join " ",
Net::Netrc->lookup("MyCpanMirror")->lpa'

If you're still able to use the ftp command to manually log in to your
mirror, you should be able to configure CPAN to use that, as a
workaround. I say you should, but I don't know how tenaciously it may
try to use Net::FTP (or whatever is broken) instead.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to