| Next: Yawns::Comment::Notifier | Previous: Yawns::Bookmarks | [Table of Contents] |
Yawns::Comment - A module for working with a single comment.
#!/usr/bin/perl -w
use Yawns::Comment;
use strict;
my $comments = Yawns::Comment->new( article => 40 );
my $id = $comments->add( title => "test",
body => "bob" );
This module contains code for dealing with a single comment.
The comments might be upon a weblog entry, a poll, or an article.
Create a new instance of this object.
Return a single comment from the database. Used primarily for fetching the details of a comment when a user makes a new reply.
Edit the contents of a comment
Return the email address of the person who posted a given comment. This is only used for testing.
Add a comment to the given article, poll, or weblog:
my $comment = Yawns::Comment->new();
$comment->add( article => 40,
author => "Steve",
title => "Comment title",
body => "Body text\nhere" );
Delete the given comment.
Report the given comment. This doesn't delete the comment, instead it merely flags the comment as being poor.
Get the score of a comment.
Get the username who posted the given comment.
Decrease the count of comments on the given article.
Decrease the number of comments on a given poll.
Decrease the count of comments on a given weblog.
Invalidate any cached comments in memory. TODO: Use caching here.
Steve Kemp
http://www.steve.org.uk/
Copyright (c) 2005,2006 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.