12.07.2015 Views

Load Balancing with Perlbal - Milton Keynes Perl Mongers

Load Balancing with Perlbal - Milton Keynes Perl Mongers

Load Balancing with Perlbal - Milton Keynes Perl Mongers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# If there's no existing hook for end_web_request in# http_response_sent, add one.if (! exists &<strong><strong>Perl</strong>bal</strong>::Service::end_web_request) {# Add dummy hook*<strong><strong>Perl</strong>bal</strong>::Service::end_web_request = sub { };# Copy the original http_response_sent*_http_response_sent_orig =*<strong><strong>Perl</strong>bal</strong>::ClientHTTPBase::http_response_sent;}# Override <strong>with</strong> our own, which includes the hook*<strong><strong>Perl</strong>bal</strong>::ClientHTTPBase::http_response_sent =*_http_response_sent;sub _http_response_sent {my <strong><strong>Perl</strong>bal</strong>::ClientHTTPBase $self = shift;$self->{'service'}->run_hook('end_web_request', $self);}_http_response_sent_orig($self);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!