NAME

WWW::AdventCalendar::Article - one article in an advent calendar

VERSION

version 1.107

DESCRIPTION

Objects of this class represent a single article in a WWW::AdventCalendar. They have a very limited set of attributes. The primary task of this class is the production of an HTML version of the article's body.

ATTRIBUTES

date

This is the date (a DateTime object) on which the article is to be published.

title

This is the title of the article.

topic

This is the topic of the article. This attribute is required, for now, but may become optional in the future.

author

This is the author of the article. This attribute is required. It should be given in mailbox format:

John Smith <jsmith@example.com>

body

This is the body of the document, as a string. It is expected to be Pod.

calendar

This is the WWW::AdventCalendar object in which the article is found.

body_html

This is the body represented as HTML. It is generated as required by a private builder method.

METHODS

author_email

This returns the email portion of the author. If none is present, it returns an email-like string unique to the author's name.

author_name

This returns the name portion of the author. If the author value doesn't appear to be a mailbox string, the whole value is returned.

AUTHOR

Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Ricardo SIGNES.

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