NAME
HTTP::Proxy::Builder - Assemble several proxies into a single one.
SYNOPSIS
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' );
DESCRIPTION
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.
EXPORTED VARIABLE
HTTP::Proxy::Builder
exports the $proxy
variable.
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).
EXPORTED FUNCTIONS
HTTP::Proxy::Builder
exports the following functions:
- proxy_load( $file, ... )
-
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.
- proxy_abort( $reason )
-
Abort the proxy start. To be used when a proxy script must not be run.
Note that calling
die()
in your script will automaticallyabort()
(not in the context of aneval
, though).
SEE ALSO
HTTP::Proxy
, code in the eg/ directory.
AUTHOR
Philippe Bruhat (BooK), <book@cpan.org>
.
BUGS
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.
SUPPORT
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
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT
Copyright 2008 Philippe Bruhat (BooK), all rights reserved.
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.