HTTP::Request::FromLog - convert to HTTP::Request object from Apache's access_log record.
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);
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.
Takeshi Miki <miki@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTTP::Request::FromLog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Request::FromLog
CPAN shell
perl -MCPAN -e shell install HTTP::Request::FromLog
For more information on module installation, please visit the detailed CPAN module installation guide.