NAME
WWW::UsePerl::Journal - A use.perl.org journal tool
SYNOPSIS
use WWW::UsePerl::Journal;
my $journal = WWW::UsePerl::Journal->new('russell')
print $journal->entrytitled("Text::Echelon");
my @entries = $journal->entrytitles();
DESCRIPTION
An all round journal tool for use.perl addicts. Will access journal entries for a specific user, or the latest 30 postings, or retrieve a specific journal entry. Can also post into a specific user's journal.
METHODS
new( [ $username | $userid ] )
use WWW::UsePerl::Journal;
my $j1 = WWW::UsePerl::Journal->new('russell');
my $j2 = WWW::UsePerl::Journal->new(1413);
Creates an instance for the specified user, using either a username or userid. Note that you must specify a name or id in order to instantiate the object.
error
If an error message given, sets the current message and returns undef. If no message given returns that last error message.
user
Returns the username
uid
Returns the user ID
recentarray
Returns an array of the 30 most recently posted WWW::UsePerl::Journal::Entry objects.
entryhash
Returns a hash of WWW::UsePerl::Journal::Entry objects
entryids
Returns an array of the entry IDs
Can take an optional hash containing; {descending=>1} to return a descending list of journal IDs, {ascending=>1} to return an ascending list or {threaded=>1} to return a thread ordered list. The latter being the default.
entrytitles
Returns an array of the entry titles
Can take an optional hash containing; {descending=>1} to return a descending list of comment IDs, {ascending=>1} to return an ascending list or {threaded=>1} to return a thread ordered list. The latter being the default.
entry
Returns the text of an entry, given an entry ID
entrytitled
Returns an entry object given an entry title. To obtain the entry details use the underlying object methods:
my $e = $j->entrytitled('My Journal');
my $eid = $e->id;
my $title = $e->title;
my $content = $e->content;
Note that prior to v0.21 this used a regular expression to match the user data against the title. Due to this being a potential security risk, as of v0.22 the title passed to this method is now required to be a string that will match all or part of the journal title you require.
refresh
To save time, entries are cached. However, following a post or period of waiting, you may want to refresh the list. This functions allows you to clear the cache and start again.
login
Required before posting can occur, takes the password.
my $post = $j->login($password);
DEBUG METHODS
debug
Turns internal debugging on or off. Use a true or false expression to set value as appropriate. Returns current status.
log
Used to record internal debugging messages. Call externally with no arguments to retrieve the current list of messages.
raw
For debugging purposes.
TODO
Better error checking and test suite.
Comment retrieval - see WWW-UsePerl-Journal-Thread
Writing activities (modify, delete ...)
CAVEATS
Beware the stringification of WWW::UsePerl::Journal::Entry objects. They're still objects, they just happen to look the same as before when you're printing them. Use ->content instead.
The time on a journal entry is the localtime of the user that created the journal entry. If you aren't in the same timezone, that time can appear an hour out.
SEE ALSO
http://use.perl.org/, LWP
SUPPORT
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please submit a bug to the RT system (see link below). However, it would help greatly if you are able to pinpoint problems or even supply a patch.
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me by sending an email to barbie@cpan.org .
RT: http://rt.cpan.org/Public/Dist/Display.html?Name=WWW-UsePerl-Journal
AUTHOR
Original author: Russell Matbouli
<www-useperl-journal-spam@russell.matbouli.org>,
<http://russell.matbouli.org/>
Current maintainer: Barbie, <barbie@cpan.org>
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
CONTRIBUTORS
Thanks to Iain Truskett, Richard Clamp, Simon Wilcox, Simon Wistow and Kate L Pugh for sending patches. 'jdavidb' also contributed two stats scripts.
COPYRIGHT AND LICENSE
Copyright (C) 2002-2004 Russell Matbouli.
Copyright (C) 2005-2007 Barbie for Miss Barbell Productions.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
The full text of the licenses can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl in Perl 5.8.1 or later.