NAME

HTTP::Request::FromLog - convert to HTTP::Request object from Apache's access_log record.

SYNOPSIS

use HTTP::Request::FromLog;

my %args = (
  host   => '192.168.1.5',
);

my $log2hr = HTTP::Request::FromLog->new(%args);
my $ua = LWP::UserAgent->new;
open(LOG, "access_log");
while( my $rec = <LOG> ){
  my $http_request  = $log2hr->convert($rec);
  my $http_response = $ua->request($http_request);
  # do something
}
close(LOG);

---
# Default engine has a parser as `Parse::AccessLogEntry`.
# You can change your custom engine instead of this.

my %args = (
  host => '192.168.1.5',
  engine => 'My::Custom::Engine' 
  engine_args => { $key => $value, .... }
);
my $log2hr = HTTP::Request::FromLog->new(%args);

DESCRIPTION

This module converts Apache's access_log to an HTTP::Request object.

So that, it will be able to spread the http request to Develop Environment Server from Commercial Environment Server.

METHODS

new()

convert()

AUTHOR

Takeshi Miki <miki@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO