NAME
News::Active::Entry - an object for storing specific active file information
SYNOPSIS
use News::Active::Entry;
use News::Active;
my $item = new News::Active::Entry("humanities.philosophy.objectivism");
$item->add_article(1);
my $string = $item->output;
See below for more specific information about related functions.
DESCRIPTION
News::Active::Entry contains the actual active file entries for News::Active. Each entry consists of a group name, flags, and information about the article numbers in the group. Within that, it is a very simple module (significantly more lines dedicated to documentation than actual code).
USAGE
News::Active::Entry is accessed through the following functions:
Functions
- new ( STRING )
-
Creates and returns a new News::Active::Entry object.
STRING
is a scalar containing the group name, first article, final article, group flags, and article count for the given group, separated by '::'.Only the group name is really required; the rest will be worked on on their own. Therefore, just passing in the group name will work fine.
- first ( [NUMBER] )
- final ( [NUMBER] )
- count ( [NUMBER] )
- name ( [STRING] )
- flags ( [STRING] )
-
Returns the relevant information from the object, as indicated above. If an argument is passed to these functions, then the value is set to that value; otherwise, we just return the existing value.
- arrayref ()
-
Returns an array reference containing
final()
,first()
, andflags()
(the same information stored by INN's active file). - print ()
-
Makes a human-readable string containing the information from name(), first(), final(), flags(), and count().
- add_article ( [COUNT] )
-
Indicates that we've added a single article to the given newsgroup, by incrementing both final() and count() by
COUNT
(defaults to 1). first() is set to one if it was not set. Returns the number of articles we added. - next_number ()
-
Returns the next article number that we will be saving to.
- output ()
-
Returns the string that is needed by new() - ie, a string containing name(), first(), final(), flags(), and count() separated by '::'.
REQUIREMENTS
News::Active
SEE ALSO
News::Active
AUTHOR
Tim Skirvin <tskirvin@killfile.org>
HOMEPAGE
http://www.killfile.org/~tskirvin/software/news-archive/
http://www.killfile.org/~tskirvin/software/newslib/
LICENSE
This code may be redistributed under the same terms as Perl itself.
COPYRIGHT
Copyright 2003-2004, Tim Skirvin.