| Bryar documentation | Contained in the Bryar distribution. |
Bryar::Comment - Represents a comment on a blog post
$self->new(...);
$self->content(); # Get (clean version of) content
$self->epoch(); # Get epoch
$self->timepiece(); # Get the date as a Time::Piece object
$self->author(); # Get author
$self->url(); # Get author URL
$self->id # ID of blog document this is attached to
This encapsulates a comment on a particular blog posting. Inherits from Bryar::Document for convenience.
$self->new(%params)
Creates a new Bryar::Comment instance.
$self->content(); # Get content
Gets the value of the comment's content
$self->url(); # Get url
Gets a URL provided by the author.
This module is free software, and may be distributed under the same terms as Perl itself.
Copyright (C) 2003, Simon Cozens simon@kasei.com
some parts Copyright 2007 David Cantrell david@cantrell.org.uk
| Bryar documentation | Contained in the Bryar distribution. |
package Bryar::Comment; use base 'Bryar::Document'; # It sort-of is. use Time::Piece; use 5.006; use strict; use warnings; use Carp; our $VERSION = '1.1';
sub new { my $class = shift; my %args; { no warnings; %args = @_; } # turn off mumbling about uninitialised list my $self = bless { epoch => $args{epoch} , content => $args{content} , author => $args{author} , url => $args{url} , id => $args{id}, }, $class; return $self; }
sub content { my $self = shift; # Tidy content here! return $self->{content}; }
sub url { my $self = shift; return $self->{url}; } 1;