The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Web::Compare - Compare web pages

SYNOPSIS

    use Web::Compare;
    
    my $wc = Web::Compare->new($left_url, $right_url);
    warn $wc->report;

DESCRIPTION

Web::Compare is the tool for comparing web pages.

It might be useful like below.

    use Web::Compare;
    
    my $wc = Web::Compare->new(
        'http://staging.example.com/foo/bar',
        'http://production.example.com/foo/bar',
    );
    warn $wc->report;

To compare staging web page to production web page.

METHODS

new($left_url, $right_url[, $options_ref])

constractor

$left_url and $right_url is the URL or these should be HTTP::Request object.

$options_ref follows bellow params.

ua

The user agent object what you want.

diff

By default, Web::Compare uses Diff::LibXDiff for reporting diff. If you want to use an other diff tool, you'll set diff param as code ref.

    use Web::Compare;
    use String::Diff qw//;
    
    my $wc = Web::Compare->new(
        $lefturl, $righturl, {
            diff => sub {
                my ($left, $right) = @_;

                String::Diff::diff_merge($left, $right);
            },
        },
    );

report

Send requests and report diff

REPOSITORY

Web::Compare is hosted on github: http://github.com/bayashi/Web-Compare

Welcome your patches and issues :D

AUTHOR

Dai Okabayashi <bayashi@cpan.org>

SEE ALSO

LICENSE

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