NAME

OurNet::BBSApp::Sync - Sync between BBS article groups

SYNOPSIS

    my $sync = OurNet::BBSApp::Sync->new({
        artgrp      => $local->{boards}{board1}{articles},
        rartgrp     => $remote->{boards}{board2}{articles},
        param       => {
	    lseen   => 0,
	    rseen   => 0,
	    remote  => 'bbs.remote.org',
	    backend => 'BBSAgent',
	    board   => 'board2',
	    lmsgid  => '',
	    msgids  => {
	    	articles => [
		    '<20010610005743.6c+7nbaJ5I63v5Uq3cZxZw@geb.elixus.org>',
		    '<20010608213307.suqAZQosHH7LxHCXVi1c9A@geb.elixus.org>',
		],
		archives => [
		    '<20010608213307.suqAZQosHH7LxHCXVi1c9A@geb.elixus.org>',
		    '<20010608213307.suqAZQosHH7LxHCXVi1c9A@geb.elixus.org>',
		],
            },
        },
        force_fetch => 0,
	force_send  => 0,
	force_none  => 0,
	msgidkeep   => 128,
	recursive   => 0,
	clobber	    => 1,
        backend     => 'BBSAgent',
        logfh       => \*STDOUT,
	callback    => sub { },
    });

    $sync->do_fetch('archives');
    $sync->do_send;

DESCRIPTION

OurNet::BBSApp::Sync performs a sophisticated synchronization algorithm on two OurNet::BBS ArticleGroup objects. It operates on the first one (lartgrp)'s behalf, updates what's being done in the param field, and attempts to determine the minimally needed transactions to run.

The two methods, do_fetch and do_send could be used independently. Beyond that, note that the interface might change in the future, and currently it's only a complement to the ebx toolkit.

BUGS

Lots. Please report bugs as much as possible.

SEE ALSO

ebx, OurNet::BBSApp::PassRing, OurNet::BBS

AUTHORS

Chia-Liang Kao <clkao@clkao.org>, Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2001 by Chia-Liang Kao <clkao@clkao.org>, Autrijus Tang <autrijus@autrijus.org>.

All rights reserved. You can redistribute and/or modify this module under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html