in reply to Forcing CPAN.pm to ignore LWP/Net::FTP and use wget/lynx etc
In the words of the current Australian Guinness advertising campain:
Brilliant!
I slightly modified the solution by PodMaster to make my own executable script:
Only wget will work through this proxy, because it virus scans the download and does an http redirect for your "browser" to download the binary. wget is smart enough to follow this convoluted journey.#!/usr/bin/perl use CPAN(); $CPAN_has_usable = \&CPAN::has_usable; local *CPAN::has_usable = sub { return if $_[1] =~ /^(?:Net|LWP)/; return $CPAN_has_usable->( @_ ); }; CPAN::shell();
To skip lynx and the other command line tools, I hacked my MyConfig.pm in ~/.cpan/CPAN to say something like:
Hey - it works. Also note that you can set your proxy config in MyConfig.pm like so:'ncftpget' => q[/bin/false], 'ftp' => q[/bin/false], 'lynx' => q[/bin/false],
Thankyou all.'http_proxy' => q[10.10.10.10:8000], 'proxy_pass' => q[myPassWord], 'proxy_user' => q[myUser],
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Forcing CPAN.pm to ignore LWP/Net::FTP and use wget/lynx etc
by aufflick (Deacon) on Sep 28, 2004 at 23:10 UTC |
In Section
Seekers of Perl Wisdom