NAME
WWW::UsePerl::Journal::Thread - Handles the retrieval of UsePerl journal comment threads.
SYNOPSIS
use WWW::UsePerl::Journal;
use WWW::UsePerl::Journal::Thread;
my $journal = WWW::UsePerl::Journal->new('barbie');
my @entries = $journal->entryids();
my $thread = WWW::UsePerl::Journal::Thread->new(thread => $entries[0]);
my @comments = $thread->commentids();
foreach my $id (@comments) {
printf "\n----\n%s [%d %s %d] %s",
$thread->comment($id)->subject(),
$thread->comment($id)->score(),
$thread->comment($id)->user(),
$thread->comment($id)->uid(),
$thread->comment($id)->date(),
$thread->comment($id)->content();
}
my $threadid = $thread->thread();
DESCRIPTION
A collection of routines to handle the retrieval of threads from a UsePerl (http://use.perl.org/) journal entry.
Using WWW::UsePerl::Journal, journal entry ids can be obtain. Each entry id can be used to obtain a comment thread. Each comment property is accessed via a comment object from within the thread.
METHODS
new()
use WWW::UsePerl::Journal;
my $journal = WWW::UsePerl::Journal->new('barbie');
use WWW::UsePerl::Journal::Thread;
my $j = WWW::UsePerl::Journal::Thread-E<gt>new(j => $journal, entry => $entryid);
use WWW::UsePerl::Journal::Thread;
my $j = WWW::UsePerl::Journal::Thread-E<gt>new(j => $journal, thread => $threadid);
Creates an thread instance for the specified journal entry. Note that an entry ID and thread ID are different numbers. An entry ID returned from $journal->entryids() must use the entry => $entryid form to obtain the correct thread.
thread()
Returns the current thread id.
comment($commentid)
Returns a comment object of the given comment ID
commentids()
Returns an ascending array of the comment IDs. Can take an optional hash parameter containing {descending=>1} to return a descending array of the comment IDs, or {threaded=>1} to return a thread ordered list.
BUGS & ENHANCEMENTS
No bugs reported as yet.
If you think you've found a bug, send details and patches (if you have one) to <modules@missbarbell.co.uk>.
If you have a suggestion for an enhancement, though I can't promise to implement it, please send details to <modules@missbarbell.co.uk>.
AUTHOR
Barbie, <barbie@missbarbell.co.uk>
for Miss Barbell Productions.
CREDITS
Russell Matbouli, for creating WWW::UsePerl::Journal in the first place and giving me the idea to extend it further.
COPYRIGHT AND LICENSE
Copyright 2003 by Barbie.
Distributed under GPL v2. See COPYING included with this distibution.
SEE ALSO
perl, WWW::UsePerl::Journal, LWP
http://use.perl.org/
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 70:
You forgot a '=back' before '=head2'