Bryar::Document - Represents a blog post
$self->new(...); $self->content(); # Get content $self->title(); # Get title $self->epoch(); # Get epoch $self->timepiece(); # Get the date as a Time::Piece object $self->category(); # Get category $self->author(); # Get author $self->keywords(...); # Return keywords relating to this document $self->id # Unique identifier $self->comments(); # Get comments
This encapsulates a blog post, as returned from a search on a data source.
$self->new(%params)
Creates a new Bryar::Document instance.
$self->content(); # Get content
Gets the value of the document's content
$self->title(); # Get title
Gets the value of the document's title
$self->epoch(); # Get epoch
Gets the value of the document's epoch
Returns the date of the document as a Time::Piece object.
Returns the date of the document as a DateTime object
$self->category(); # Get category
Gets the value of the document's category
$self->author(); # Get author
Gets the value of the document's author
$self->keywords
Returns the keywords for this blog entry, using Lingua::EN::Keywords if it's installed. May be computationally expensive!
Lingua::EN::Keywords
$self->id(); # Get id
Returns a unique identifier for the document.
$self->url;
Returns the post url relative to $bryar->config->baseurl.
@comments = $self->comments();
Returns a list of Bryar::Comment objects attached to this document.
my $excerpt = $self->excerpt(20); # get a 20 word excerpt my $excerpt = $self->excerpt( ); # get excerpt as long as the excerpt_words config variable
This module is free software, and may be distributed under the same terms as Perl itself.
Copyright (C) 2003, Simon Cozens simon@kasei.com
simon@kasei.com
To install Bryar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bryar
CPAN shell
perl -MCPAN -e shell install Bryar
For more information on module installation, please visit the detailed CPAN module installation guide.