HTML::Latemp::News - News Maintenance Module for Latemp (and possibly other web frameworks)
version 0.1.10
#!/usr/bin/perl use strict; use warnings; use MyManageNews; my @news_items = ( . . . { 'title' => "Changes of 18-April-2005", 'id' => "changes-2005-04-18", 'description' => q{Around 18 April, 2005, Jane's Site has seen a lot of changes. Click the link for details on them.}, 'date' => "2005-04-18", 'author' => "Jane Smith", 'category' => "Jane's Site", }, . . . ); my $news_manager = HTML::Latemp::News->new( 'news_items' => \@news_items, 'title' => "Better SCM News", 'link' => "http://janes-site.tld/", 'language' => "en-US", 'copyright' => "Copyright by Jane Smith, (c) 2005", 'webmaster' => "Jane Smith <jane@janes-site.tld>", 'managing_editor' => "Jane Smith <jane@janes-site.tld>", 'description' => "News of Jane's Site - a personal site of " . "Jane Smith", ); $news_manager->generate_rss_feed( 'output_filename' => "dest/rss.xml" ); 1;
This is a module that maintains news item for a web-site. It can generate an RSS feed, as well as a news page, and an HTML newsbox, all from the same data.
This is the constructor for the news manager. It accepts the following named parameters:
This is a reference to a list of news_items. See below.
The title of the RSS feed.
The link to the homepage of the site.
The language of the text.
The copyright notice of the text.
The Webmaster.
The managing editor.
A description of the news feed as will be put in the RSS feed.
The news_items is a reference to an array, of which each element is a hash reference. The hash may contain the following keys:
The title of the item.
The ID of the item. This will also be used to calculate URLs.
A text description explaining what the item is all about.
The author of the item.
A string representing the daet.
The cateogry of the item.
This generates an RSS feed. It accepts two named arguments. 'output_filename' is the name of the RSS file to write to. 'num_items' is the number of items to include, which defaults to 10.
'output_filename'
'num_items'
This generates navigation menu items for input to the navigation menu of HTML::Widgets::NavMenu. It accepts a named argument 'num_items' which defaults to 10.
This generates HTML for the news page. 'base_url' points to a URL to be appended to each item's ID.
This generates an HTML news box with the recent headlines.
Shlomi Fish, http://www.shlomifish.org/ .
Please report any bugs or feature requests to bug-html-latemp-news@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Latemp-News. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-html-latemp-news@rt.cpan.org
XML::RSS, HTML::Widgets::NavMenu.
Copyright 2005 Shlomi Fish, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the MIT X11 license.
Shlomi Fish <shlomif@cpan.org>
This software is Copyright (c) 2005 by Shlomi Fish.
This is free software, licensed under:
The MIT (X11) License
Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Latemp-News or by email to bug-html-latemp-news@rt.cpan.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
You can find documentation for this module with the perldoc command.
perldoc HTML::Latemp::News
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
http://metacpan.org/release/HTML-Latemp-News
Search CPAN
The default CPAN search engine, useful to view POD in HTML format.
http://search.cpan.org/dist/HTML-Latemp-News
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Latemp-News
AnnoCPAN
The AnnoCPAN is a website that allows community annotations of Perl module documentation.
http://annocpan.org/dist/HTML-Latemp-News
CPAN Ratings
The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
http://cpanratings.perl.org/d/HTML-Latemp-News
CPAN Forum
The CPAN Forum is a web forum for discussing Perl modules.
http://cpanforum.com/dist/HTML-Latemp-News
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.cpanauthors.org/dist/HTML-Latemp-News
CPAN Testers
The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/H/HTML-Latemp-News
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=HTML-Latemp-News
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=HTML::Latemp::News
Please report any bugs or feature requests by email to bug-html-latemp-news at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=HTML-Latemp-News. You will be automatically notified of any progress on the request by the system.
bug-html-latemp-news at rt.cpan.org
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)
http://bitbucket.org/shlomif/latemp
hg clone ssh://hg@bitbucket.org/shlomif/latemp
To install HTML::Latemp::News, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Latemp::News
CPAN shell
perl -MCPAN -e shell install HTML::Latemp::News
For more information on module installation, please visit the detailed CPAN module installation guide.