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

Hi every body,

I would like to work with http recorder. But i am facing problem as i new for this.
I have executed myproxy.pl for HTTP::Recorder as a Web Proxy.
but i am getting compilation error. Can anybody suggest how to overcome it. Thanks in advance.

myproxy.pl
use strict;
use warnings;

use HTTP::Proxy;
use HTTP::Recorder;

my $proxy = HTTP::Proxy->new();

# create a new HTTP::Recorder object
my $agent = new HTTP::Recorder;

# set the log file (optional)
$agent->file("C:\\Temp\\myfile");

# set HTTP::Recorder as the agent for the proxy
$proxy->agent( $agent );

# start the proxy
$proxy->start();

1;

Following compilation error i am getting.

D:\perl programs>myproxy.pl Can't locate HTTP/Proxy.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at D:\perl programs\myproxy.pl line 4. BEGIN failed--compilation aborted at D:\perl programs\myproxy.pl line 4

Replies are listed 'Best First'.
Re: setting for http recorder
by northwind (Hermit) on May 17, 2007 at 13:27 UTC

    Super short answer:
    HTTP::Proxy is not in your include path.

    Longer answer:
    This may mean it is not installed or that it is simply installed to a location not in the @INC list. If it is installed to a location not in the @INC list, you can either set PERL5LIB to point to the non-standard install location or you can put

    use lib "/path/to/nonstandard/install/location/";
    immediately after the use strict; use warnings; block.

      Thanks for inputs.
      I am working on windows OS.
      I have successfully installed http::recorder module downloaded from http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/.
      But i did n't find HTTP::Proxy module in http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/.
      I found HTTP::Proxy module at CPAN and i installed using the following steps
      perl Makefile.PL
      nmake
      nmake test
      nmake install
      The following error shown once the myproxy.pl file run.
      D:\perl programs>myproxy.pl Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME .pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME .pm line 90. Can't locate object method "query_param" via package "YMSG" (perhaps you forgot to load "YMSG"?) at C:/Perl/site/lib/HTTP/Recorder.pm line 347.

      Then I Installed NET-YMSG module to overcome this. Still the same error shown.
      can any body help me to overcome these problems.
      Thanks in advance