HTTP::Proxy::Builder - Assemble several proxies into a single one.
HTTP::Proxy::Builder can be used in a single proxy script:
HTTP::Proxy::Builder
use HTTP::Proxy::Builder; # The exported $proxy variable is a valid HTTP::Proxy object, # initialized when HTTP::Proxy::Builder is first used $proxy->push_filter( ... ); # no call to $proxy->start() is needed
or to build larger proxies from individual ones:
use HTTP::Proxy::Builder; proxy_load( 'myproxy.pl' ); proxy_load( 'myotherproxy.pl' );
Until now, HTTP::Proxy programs started as a simple one-purpose program, and quickly grew out of that when one started to "enhance" more and more web sites. Sometimes not all the features are needed, and commenting out large sections of a big proxy script is not what one would call flexible.
With HTTP::Proxy::Builder it is now possible to keep proxyies with different functionalities or aimed a different websites in separate programs, and to combine them at will using a wrapper program that aggregates them.
HTTP::Proxy::Builder lets one build a fully working proxy, that is also integrable into a larger script that loads all the individual proxies and set them up as a single configurable multi-purpose proxy.
The build_proxy command included in this distribution provides such a flexible combining proxy.
HTTP::Proxy::Builder exports the $proxy variable.
$proxy
By default, it is configured like this:
$proxy = HTTP::Proxy->new( @args );
Where @args is the content of @ARGV up to the first -- option (which is removed, to allow further processing by the main program).
@args
@ARGV
--
HTTP::Proxy::Builder exports the following functions:
Runs the script contained in the given file names. The proxy script itself must use HTTP::Proxy::Builder to work as expected.
use HTTP::Proxy::Builder
This function will run one or several external files given by name: this is potentially dangerous! Use at your own risk.
Abort the proxy start. To be used when a proxy script must not be run.
Note that calling die() in your script will automatically abort() (not in the context of an eval, though).
die()
abort()
eval
HTTP::Proxy, code in the eg/ directory.
HTTP::Proxy
Philippe Bruhat (BooK), <book@cpan.org>.
<book@cpan.org>
Please report any bugs or feature requests to bug-http-proxy-builder at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTTP-Proxy-Builder. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-http-proxy-builder at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc HTTP::Proxy::Builder
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-Proxy-Builder
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/HTTP-Proxy-Builder
CPAN Ratings
http://cpanratings.perl.org/d/HTTP-Proxy-Builder
Search CPAN
http://search.cpan.org/dist/HTTP-Proxy-Builder
Copyright 2008 Philippe Bruhat (BooK), all rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTTP::Proxy::Builder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Proxy::Builder
CPAN shell
perl -MCPAN -e shell install HTTP::Proxy::Builder
For more information on module installation, please visit the detailed CPAN module installation guide.