NAME
OurNet::BBS - Component Object Model for BBS systems
SYNOPSIS
use strict;
use OurNet::BBS;
my $backend = 'MELIX'; # use the Melix BBS backend
my $bbsroot = '/home/melix';
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, along with an asymmetric authentication and remote procedure call protocol.
For some of its practical uses, search for 'OurNet::BBSApp' on CPAN.
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>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.