HTTP::Proxy::Builder - Assemble several proxies into a single one.
HTTP::Proxy::Builder can be used in a single proxy script:
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
By default, it is configured like this:
$proxy = HTTP::Proxy->new( @args );
@args is the content of
@ARGV up to the first
-- option (which is removed, to allow further processing by the main program).
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.
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
HTTP::Proxy, code in the eg/ directory.
Philippe Bruhat (BooK),
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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.