in reply to Re^3: Strawberry CPAN via HTTP/1.0
in thread Strawberry CPAN via HTTP/1.0

Yes, I found this code. You are right, after changing this piece of code CPAN using HTTP/1.0. Thank you! But here another problem: LWP using FTP to load modules (and there is true headache). How it possible to force LWP use HTTP? I tried this method: http://www.perlmonks.org/?node_id=394501
use CPAN(); $CPAN_has_usable = \&CPAN::has_usable; local *CPAN::has_usable = sub { return if $_[1] =~ /^(?:FTP)/; return $CPAN_has_usable->( @_ ); }; print "\nCpan ok\n"; CPAN::shell();
And it works like that:
cpan>o debug all cpan> install Error Debug(CPAN,CPAN.pm,370): line[install|Error] Debug(Shell,Shell.pm,1635,[Shell,Shell.pm,1985,rematein]): pragma[]met +h[install] some[Error] Debug(Shell,Shell.pm,1688,[Shell,Shell.pm,1985,rematein]): calling exp +andany [Er ror] Debug(Shell,Shell.pm,1238,[Shell,Shell.pm,1689,expandany]): s[Error] Debug(HandleConfig,HandleConfig.pm,532,[Index,Index.pm,208,load]): doi +t[0]loadin g[0]miss[] Debug(FTP,FTP.pm,286,[Index,Index.pm,225,localize]): file[authors/01ma +ilrc.txt.g z] aslocal[C:\strawberry\cpan\sources\authors\01mailrc.txt.gz] force[3 +] carplong mess[ at C:\strawberry\perl\lib/CPAN/Index.pm line 225 CPAN::Index::reload_x('CPAN::Index', 'authors/01mailrc.txt.gz' +, 'authors \01mailrc.txt.gz', undef) called at C:\strawberry\perl\lib/CPAN/Index. +pm line 84 CPAN::Index::reload('CPAN::Index') called at C:/strawberry/per +l/lib/CPAN .pm line 953 CPAN::exists('CPAN=HASH(0x132d8c4)', 'CPAN::Module', 'Error') +called at C:\strawberry\perl\lib/CPAN/Shell.pm line 1264 CPAN::Shell::expandany('CPAN::Shell', 'Error') called at C:\st +rawberry\p erl\lib/CPAN/Shell.pm line 1689 CPAN::Shell::rematein('CPAN::Shell', 'install', 'Error') calle +d at C:\st rawberry\perl\lib/CPAN/Shell.pm line 1985 CPAN::Shell::__ANON__('CPAN::Shell', 'Error') called at C:/str +awberry/pe rl/lib/CPAN.pm line 375 eval {...} called at C:/strawberry/perl/lib/CPAN.pm line 372 CPAN::shell() called at C:\strawberry\perl\bin/cpan.bat line 2 +2 ] VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV LPW::UserAgent used! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Debug(FTP,FTP.pm,192,[FTP,FTP.pm,357,_get_urllist]): with_defaults[0] Debug(FTP,FTP.pm,202,[FTP,FTP.pm,357,_get_urllist]): u[http://cpan.mir +ror.iphh.n et/] Debug(FTP,FTP.pm,377,[Index,Index.pm,225,localize]): Themethod[]reorde +red[0] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,546,[FTP,FTP.pm,527,hostdleasy]): localizing perlish[ +http://cpa n.mirror.iphh.net/authors/01mailrc.txt.gz] Debug(FTP,FTP.pm,614,[FTP,FTP.pm,527,hostdleasy]): it was not a file U +RL Debug(Version,Version.pm,11,[Version,Version.pm,65,vcmp]): l[5.03] r[0 +.08] Debug(Version,Version.pm,18,[Version,Version.pm,65,vcmp]): l[5.03] r[0 +.08] Debug(Version,Version.pm,24,[Version,Version.pm,65,vcmp]): l[5.03] r[0 +.08] Debug(Version,Version.pm,31,[Version,Version.pm,65,vcmp]): l[5.03] r[0 +.08] Fetching with LWP: http://cpan.mirror.iphh.net/authors/01mailrc.txt.gz LWP failed with code[407] message[Proxy Authentication Required ( ISA +Server ╤В╤ А╨╡╨▒╤Г╨_. )] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,694,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,527,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] No external ftp command available Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,546,[FTP,FTP.pm,527,hostdleasy]): localizing perlish[ +http://cpa n.mirror.iphh.net/authors/01mailrc.txt.gz] Debug(FTP,FTP.pm,614,[FTP,FTP.pm,527,hostdleasy]): it was not a file U +RL Fetching with LWP: http://cpan.mirror.iphh.net/authors/01mailrc.txt.gz LWP failed with code[407] message[Proxy Authentication Required ( ISA +Server ╤В╤ ╨║╤Б╨╕. )] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,694,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,527,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] No external ftp command available Debug(FTP,FTP.pm,479,[Index,Index.pm,225,localize]): before _add_to_st +atistics Debug(FTP,FTP.pm,86,[FTP,FTP.pm,480,_add_to_statistics]): yaml_module[ +YAML] Debug(FTP,FTP.pm,481,[Index,Index.pm,225,localize]): after _add_to_sta +tistics Please check, if the URLs I found in your configuration file (http://cpan.mirror.iphh.net/) are valid. The urllist can be edited. E +.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Debug(CPAN,CPAN.pm,691,[Shell,Shell.pm,1053,all_objects]): mgr[CPAN=HA +SH(0x132d8 c4)] class[CPAN::Distribution] Debug(HandleConfig,HandleConfig.pm,532,[Index,Index.pm,208,load]): doi +t[0]loadin g[0]miss[] Debug(FTP,FTP.pm,286,[Index,Index.pm,225,localize]): file[authors/01ma +ilrc.txt.g z] aslocal[C:\strawberry\cpan\sources\authors\01mailrc.txt.gz] force[3 +] carplong mess[ at C:\strawberry\perl\lib/CPAN/Index.pm line 225 CPAN::Index::reload_x('CPAN::Index', 'authors/01mailrc.txt.gz' +, 'authors \01mailrc.txt.gz', undef) called at C:\strawberry\perl\lib/CPAN/Index. +pm line 84 CPAN::Index::reload('CPAN::Index') called at C:/strawberry/per +l/lib/CPAN .pm line 692 CPAN::all_objects('CPAN=HASH(0x132d8c4)', 'CPAN::Distribution' +) called a t C:\strawberry\perl\lib/CPAN/Shell.pm line 1053 CPAN::Shell::failed('CPAN::Shell', 2, 1) called at C:/strawber +ry/perl/li b/CPAN.pm line 413 eval {...} called at C:/strawberry/perl/lib/CPAN.pm line 413 CPAN::shell() called at C:\strawberry\perl\bin/cpan.bat line 2 +2 ] Debug(FTP,FTP.pm,192,[FTP,FTP.pm,357,_get_urllist]): with_defaults[0] Debug(FTP,FTP.pm,202,[FTP,FTP.pm,357,_get_urllist]): u[http://cpan.mir +ror.iphh.n et/] Debug(FTP,FTP.pm,377,[Index,Index.pm,225,localize]): Themethod[]reorde +red[0] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,546,[FTP,FTP.pm,527,hostdleasy]): localizing perlish[ +http://cpa n.mirror.iphh.net/authors/01mailrc.txt.gz] Debug(FTP,FTP.pm,614,[FTP,FTP.pm,527,hostdleasy]): it was not a file U +RL Fetching with LWP: http://cpan.mirror.iphh.net/authors/01mailrc.txt.gz LWP failed with code[407] message[Proxy Authentication Required ( ISA +Server ╤В╤ )] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,694,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,527,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] No external ftp command available Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,546,[FTP,FTP.pm,527,hostdleasy]): localizing perlish[ +http://cpa n.mirror.iphh.net/authors/01mailrc.txt.gz] Debug(FTP,FTP.pm,614,[FTP,FTP.pm,527,hostdleasy]): it was not a file U +RL Fetching with LWP: http://cpan.mirror.iphh.net/authors/01mailrc.txt.gz LWP failed with code[407] message[Proxy Authentication Required ( ISA +Server ╤В╤. )] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,694,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,736,[FTP,FTP.pm,527,hostdlhard]): localizing funkyftp +wise[http: //cpan.mirror.iphh.net/authors/01mailrc.txt.gz] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp4084'. Giving up on it. Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,443,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] Debug(FTP,FTP.pm,449,[Index,Index.pm,225,localize]): synth. urllist[ht +tp://cpan. mirror.iphh.net/] No external ftp command available Debug(FTP,FTP.pm,479,[Index,Index.pm,225,localize]): before _add_to_st +atistics Debug(FTP,FTP.pm,86,[FTP,FTP.pm,480,_add_to_statistics]): yaml_module[ +YAML] Debug(FTP,FTP.pm,481,[Index,Index.pm,225,localize]): after _add_to_sta +tistics Please check, if the URLs I found in your configuration file (http://cpan.mirror.iphh.net/) are valid. The urllist can be edited. E +.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Lockfile removed.