NAME
Library::Catalog::News - Perl extension for managing XML News as a catalog
SYNOPSIS
use Library::Catalog::News;
$new_cat = Library::Catalog::News->new([ qw/author title date time/ ]);
$new_cat->add( { title => "title" }, { title => "title2" } );
$new_cat->save( $filename );
$other_cat = Library::Catalog::News->load( $filename );
$other_cat->as_HTML( $count, $template );
@records = $other_cat->asList();
DESCRIPTION
This module creates an XML file of news. This file will be handled as a catalog as described by Library::Catalog. The news file is a set of records. Each record consists of some data fields. This module assumes some fields as possible fields. Some are required and some are optional, and can be defined in the constructor in any order you would like.
Fields
Valid fields in the news file are:
date
-
As any new you can imagine, there is necessary a date. This date consists of a day, month and year. It is REQUIRED.
time
-
On some cases, there are many news each day. This can cause confusion, so the module makes it possible to define an hour:minute pair for each new. It is OPTIONAL.
title
-
Normally a new consists of something more than a date and a description. It contains, specially, a title to resume all the new text. It is REQUIRED.
url
-
There can be an
url
to point to a special address where the new is more described, or the address for the new object in cause. It is OPTIONAL. description
-
This is a core of the new. A small text describing the new. For a question of flexibility we support some XHTML tags on this field, but we really discourage using more than simple bold and italic ones. It is OPTIONAL.
-
In some situations it could be usefull to associate a user to each new posted. Use this to make the trick. It is OPTIONAL.
AUTHOR
Alberto M. B. Simões <albie@alfarrabio.di.uminho.pt>
SEE ALSO
Manpages CGI(3) and perl(1).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 513:
Non-ASCII character seen before =encoding in 'Simões'. Assuming CP1252