coder57 has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install http::proxy on activeperl so far I searched on ppm and there was no module calld http::proxy, I tried cpan, and after typing : install http::proxy it seemed to install ok, hwoever on running the prog it states that: Can't locate HTTP/Proxy .) at htr1.pl line 4. The code for the program so far is:
#!/usr/bin/perl use strict; use warnings; use HTTP::Proxy; use HTTP::Recorder; my $proxy = HTTP::Proxy->new( port => 3333 ); # create a new HTTP::Recorder object my $agent = new HTTP::Recorder; # set the log file $agent->file("c:/htr1.txt"); # set HTTP::Recorder as the agent for the proxy $proxy->agent($agent); #start the proxy $proxy->start(); 1;

Replies are listed 'Best First'.
Re: Unable to install http::proxy on activeperl
by shmem (Chancellor) on Oct 24, 2006 at 20:13 UTC
    and after typing : install http::proxy it seemed to install ok

    • what was it that gave you the impression it did?
    • do you have some output of the install process? did you read it?
    • ask yourself - what bits of information are missing from your post to make me not point towards some general direction, e.g. equator, roughly?
    • have you seen How do I post a question effectively?

    In other words - well, perl seems to be unable to find the file HTTP/Proxy.pm. I could only throw in wild guesses about why it can't without further information from you (perl version, install log, OS version and so on...)

    Check the perl include path typing perl -V at a cmd prompt and search in the directories shown there for a directory HTTP and a file called Proxy.pm in it. If you can't find it, the package wasn't installed successfully.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      My apologies for not elaborating more, I am running active perl 5.8.6 on win98se typing in perl -v does not show proxy.pm. I did do a force install Http::proxy on the cpan console, still no difference perl -v shows:
      Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=define use5005threads=undef useithreads=define usemulti +plicity=d fine useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D +_CONSOLE DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT - +DPERL_IMP ICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeks ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -l +ibpath:"C: \Perl\lib\CORE" -machine:x86' libpth=\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui +d.lib ws2_ 32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.l +ib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib comd lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib + uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvc +rt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt: +ref,icf - libpath:"C:\Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL +_IMPLICIT_ CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 811 libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:r +ef,icf ibpath:"C:\Perl\lib\CORE" -machine:x86' haracteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_ +IMPLICIT ONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 811 - More -- 21540 Fix backward-compatibility issues in if.pm 23565 Wrong MANIFEST.SKIP Built under MSWin32 Compiled at Dec 13 2004 09:52:01 @INC: C:/Perl/lib C:/Perl/site/lib .
Re: Unable to install http::proxy on activeperl
by syphilis (Archbishop) on Oct 25, 2006 at 04:33 UTC
    Try running:
    ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Proxy.ppd

    Cheers,
    Rob
Re: Unable to install http::proxy on activeperl
by Errto (Vicar) on Oct 25, 2006 at 02:51 UTC
    It may be (I seem to recall this actually) that none of the major PPM repositories happens to carry HTTP::Proxy, which is a shame because it's a darned useful module. So you may have to just install it yourself the old-fashioned way. Create a sub-directory under C:\Perl\site-lib\ called HTTP and put Proxy.pm right in there. Note that this method only works for modules that are self-contained and don't have any binary portions.