NAME

Gnus::Newsrc - parse ~/.newsrc.eld files

SYNOPSIS

$newsrc = Gnus::Newsrc->new;
($level, $read, $marks, $server, $group_para) =
   @{$newsrc->alist_hash->{"comp.lang.perl.misc"}};

DESCRIPTION

The Gnus::Newsrc objects represents the content of the ~/newsrc.eld files that the Gnus newsreader use to store away its state.

The following methods are provided:

$newsrc = Gnus::Newsrc->new( [$filename] )

The object constructor takes an optional filename as argument. The file defaults to ~/.newsrc.eld. It will read and parse the file and return a reference to a Gnus::Newsrc object. The constructor will croak if the file can't be found or can't be parsed.

$newsrc->file_version

Return the version number found in the file (gnus-newsrc-file-version). The version number is a string like "Gnus v5.5".

$newsrc->last_checked_date

Returns a string like "Sat Oct 18 14:05:53 1997" (gnus-newsrc-last-checked-date).

$newsrc->alist

Returns a reference to an array that will have one element for each active newsgroup (gnus-newsrc-alist). Each element is a array with the following values:

$group_name
$group_level
$read_articles
\%marks
\@server
\%group_parameters

The $read_articles and %marks values is a string of integer ranges, and it is suitable for initializing a Set::IntSpan objects.

$newsrc->alist_hash

Returns a reference to a hash indexed by group names. The hash values are the same as the alist elements, but the $group_name is missing.

$newsrc->server_alist

(gnus-server-alist).

$newsrc->killed_list

A reference to an array that contains all the killed newsgroups (gnus-killed-list).

$newsrc->zombie_list

A reference to an array that contains all zombie newsgroups (gnus-zombie-list).

$newsrc->format_specs

SEE ALSO

Set::IntSpan, http://www.gnus.org

COPYRIGHT

Copyright 1997 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.