NAME

OurNet::BBS - Component Object Model for BBS systems

SYNOPSIS

    use strict;
    use OurNet::BBS;
    
    my $backend = 'CVIC'; # same as 'OurNet::BBS::CVIC'
    my $bbsroot = '/srv/bbs/cvic';
    my $board   = 'sysop';
    my $BBS     = OurNet::BBS->new($backend, $bbsroot);
    my $brd     = $BBS->{boards}{$board};
    my $mtime;
    
    printf (
        "This BBS has %d boards, %d groups.\n",
        scalar keys(%{$BBS->{boards}}),
        scalar keys(%{$BBS->{groups}}),
    );
    
    eval { $mtime = $brd->{articles}->mtime };
    die "Error: cannot read board $board -- $@\n" if $@;
    
    printf (
        "The $board board has %d articles, %d toplevel archive entries.\n",
        $#{$brd->{articles}}, $#{$brd->{archives}},
    );
    
    # A simple Sysop board article monitor
    print "Watching for new articles...\n";
    
    while (1) {
        print "=== wait here ($mtime) ===\n";
        sleep 5 until ($brd->{articles}->refresh);
    
        foreach my $article (@{$brd->{articles}}[1..$#{$brd->{articles}}]) {
            print "Found article: $article->{title}\n" 
		if $article->btime > $mtime;
        }
    
        $mtime = $brd->{articles}->mtime;
    }

DESCRIPTION

OurNet::BBS implements a flexible object model for different BBS backends.

More detailed document is expected to appear soon.

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.