NAME

CGI::Application::NetNewsIface - a publicly-accessible read-only interface for Usenet (NNTP) news.

SYNOPSIS

In a common module:

use CGI::Application::NetNewsIface;

sub get_app
{
    return CGI::Application::NetNewsIface->new(
        PARAMS => {
            'nntp_server' => "nntp.perl.org",
            'articles_per_page' => 10,
            'dsn' => "dbi:SQLite:dbname=./data/mynntp.sqlite",
        }
    );
}

To set up:

get_app()->init_cache__sqlite();

To run

get_app()->run();

PARAMS

nntp_server

The Server to which to connect using NNTP.

articles_per_page

The number of articles to display per page of listing of a newsgroup.

dsn

The DBI 'dsn' for the cache.

FUNCTIONS

$cgiapp->setup()

The setup subroutine as required by CGI::Application.

cgiapp_prerun()

This is the cgiapp_prerun() subroutine.

$cgiapp->update_group($group)

Updates the cache records for the NNTP group $group. This method is used for maintenance, to make sure a script loads promptly.

$cgiapp->init_cache__sqlite()

Initializes the SQLite cache that is pointed by the DBI DSN given as a parameter to the CGI script. This should be called before any use of the CGI Application itself, because otherwise there will be no tables to operate on.

$cgiapp->init_cache__mysql()

Initializes the MySQL cache that is pointed by the DBI DSN given as a parameter to the CGI script. This should be called before any use of the CGI Application itself, because otherwise there will be no tables to operate on.

AUTHOR

Shlomi Fish, http://www.shlomifish.org/ .

BUGS

Please report any bugs or feature requests to bug-cgi-application-netnewsiface@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-NetNewsIface. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Known Bugs

None, but it doesn't mean there aren't any bugs.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2006 Shlomi Fish, all rights reserved.

This program is released under the following license: MIT X11.