CompBot
Perl Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
t
.gitignore
Changes
Makefile.PL
example.pl
readme.pod

readme.pod

NAME

CompBot - Compare a site with mirror

SYNOPSIS

use CompBot;

my $sd = CompBot->new;
$sd->url_match(qr{dev.example.com});
$sd->url_translate(sub {
    my $url = shift;
    $url->host('example.com');
    return $url;
});
$sd->start('http://dev.example.com/index.htm');

DESCRIPTION

This is a tool for comparing two websites. You can recursively compare the web pages of two.

ATTRIBUTES

ua

Mojo::UserAgent instance.

preprocess_a

Can set code ref for pre-processing for response body of A.

preprocess_b

Can set code ref for pre-processing for response body of B.

url_translate

Generate B URL from A URL. The code gets Mojo::URL object and must returns B URL.

$sd->url_translate(sub {
    my $url = shift;
    $url->host('example.com');
    return $url;
});

sleep

Set the interval of HTTP requests in second.

url_match

Restrict target URL by regular expression. This is matched to A URL.

METHODS

CompBot->start

Start comparing.

$sd->start('http://dev.example.com/index.htm');

AUTHOR

Sugama Keita, <sugama@jamadam.com>

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Sugama Keita.

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