I'm by no means a professional programmer, but am trying to write a perl program using HTTP::Recorder and HTTP:
roxy. To start, I copied the example given at CPAN for the HTTP::Recorder module:
>!/usr/bin/perl
>
>use HTTP:
roxy;
>use HTTP::Recorder;
>
>my $proxy=HTTP:
roxy->new();
>
>#create a new HTTP::Recorder object
>my $agent = new HTTP::Recorder;
>
>#set the log file
>$agent->file("~/perl/proxytmpfile");
>
>#set HTTP::Recorder as the agent for the proxy
>$proxy->agent( $agent );
>
>#start the proxy
>$proxy->start();
>
>1;
When I run with perl, I'm not sure what to expect - it looks like it's hung (no command prompt) but maybe that's what it does while it's running the proxy? I'm pretty sure I have all the modules installed correctly (until I did I used to get an error when trying to run but now I don't).
The other question I have is how do I set my web browser to use this proxy? I know from the HTTP:
roxy FAQ that the default port is 8080. Is that all I have to set for my browser's HTTP proxy setting or do I need a default address as well? If so, what's the default address? This isn't clear in either the HTTP::Recorder FAQ (it just says to set the browser proxy to the one created by the program but doesn't say what that is).
I tried setting my brower port to 8080 only and using the manual proxy configuration setting on my browser (firefox) but I'm not generating a log file at all.
Also, probably a dumb question, but what's the purpose of the final line in the code above?
Thanks in advance for any help!
Matt

>!/usr/bin/perl
>
>use HTTP:

>use HTTP::Recorder;
>
>my $proxy=HTTP:

>
>#create a new HTTP::Recorder object
>my $agent = new HTTP::Recorder;
>
>#set the log file
>$agent->file("~/perl/proxytmpfile");
>
>#set HTTP::Recorder as the agent for the proxy
>$proxy->agent( $agent );
>
>#start the proxy
>$proxy->start();
>
>1;
When I run with perl, I'm not sure what to expect - it looks like it's hung (no command prompt) but maybe that's what it does while it's running the proxy? I'm pretty sure I have all the modules installed correctly (until I did I used to get an error when trying to run but now I don't).
The other question I have is how do I set my web browser to use this proxy? I know from the HTTP:

I tried setting my brower port to 8080 only and using the manual proxy configuration setting on my browser (firefox) but I'm not generating a log file at all.
Also, probably a dumb question, but what's the purpose of the final line in the code above?
Thanks in advance for any help!
Matt