Next:
Yawns::Comment::Notifier
Previous:
Yawns::Bookmarks
 [Table of Contents]

Yawns::Comment



NAME

Yawns::Comment - A module for working with a single comment.

SYNOPSIS

    #!/usr/bin/perl -w

    use Yawns::Comment;
    use strict;

    my $comments = Yawns::Comment->new( article => 40 );

    my $id = $comments->add( title => "test",
                              body => "bob" );

DESCRIPTION

This module contains code for dealing with a single comment.

The comments might be upon a weblog entry, a poll, or an article.

new

  Create a new instance of this object.

get

  Return a single comment from the database.  Used primarily for fetching
 the details of a comment when a user makes a new reply.

editComment

  Edit the contents of a comment

getEmail

  Return the email address of the person who posted a given comment.

  This is only used for testing.

add

  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

  Delete the given comment.

report

  Report the given comment.

  This doesn't delete the comment, instead it merely flags the
 comment as being poor.

getScore

   Get the score of a comment.

_getCommentPoster

   Get the username who posted the given comment.

_decrease_article_comment_count

   Decrease the count of comments on the given article.

_decrease_poll_comment_count

   Decrease the number of comments on a given poll.

_decrease_weblog_comment_count

   Decrease the count of comments on a given weblog.

invalidateCache

  Invalidate any cached comments in memory.

  TODO:  Use caching here.

AUTHOR

Steve Kemp

http://www.steve.org.uk/

LICENSE

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.


[Top] Generated by HTML::FromPod 0.49 on Tue Jan 6 03:03:56 2009