WWW::Lunarstorm - Perl module for interacting with the Swedish community Lunarstorm
use strict; use WWW::Lunarstorm; my $lunar = new Lunarstorm(Username => 'myusername', Password => 'mypassword', UserID => '{DEADBEAF-BABE-DEAD-BABE-DEADBEAFBABE}', CookiePath => '/directory/to/place/cookiefile/in'); $lunar->login() or die "Unable to login"; $lunar->logout() or die "Unable to logout";
This module provides functions for interacting with the Swedish community Lunarstorm (www.lunarstorm.se).
Return a new Lunarstorm object. Valid attributes are:
Your Lunarstorm username
Your Lunarstorm password
Your Lunarstorm userid. This is a id use by lunarstorm internaly. Every user got an id in the form of {DEADBEAF-BABE-DEAD-BABE-DEADBEAFBABE}. This is needed to locate your personal guestbook etc.
I'll most likely remove this from the constructor in future versions.
Logs in to the community. May be integrated in constructor in future versions. Returns 1 on success and 0 on failure.
Logs out from the cumminty. May be integrated in the destructor in f uture versions. Returns 1 on success and 0 on failure.
Retrives a list of people who have visited you personal page.
Returns a hash containing:
USERID is the lunarstorm id.
Takes two arguments. Page number and userid. Page number is the page number which you wish to retrive guestbook entries from. Page number 1 represents the latest page in the guestbook. Userid is the lunarstorm id of the person whos guestbook you wish to read from. If left out, your own guestbook is read.
TEXT is the body of the message.
Takes four arguments. Username, userid, guestbookitem id and the text you wish to sign the guestbook with. Username is the username of the user whos guestbook you are to sign. Userid is the users lunarstorm id. Guestbookitem id is a id given to every guestbook item. It is used to identify which item you replied to, so that it can be marked as answered. Returns 1 on success and 0 on failure.
Takes one optional argument, userid. Userid is the lunarstorm id of the person whos list of relations you wish to retrive. If left out, your own list of relations is retrived.
Takes zero arguments. Retrives all items in the scribble board.
TEXT is the body of the scribble.
Takes one argument, the text you wish to write on the board. Returns 1 on success and 0 on failure.
Takes zero arguments. Retrievs a list of newly created, or ended relations. These are accapted with accept_relation().
If TYPE is "CLOSED", the relation is a closed one. Else TYPE contains a string containing the relation type.
Takes one argument, a hash containing at least two variables: USERID and TYPE. It is recommened to just pass the hash returned by relations_status(). For example:
my @relations = $lunar->relations_status(); foreach my $relation (@relations){ $lunar->accept_relation($relation); }
Returns 1 on success and 0 on failure.
LWP::UserAgent, HTTP::Cookies, HTML::TableExtract, URI::Escape
Martin Stenberg <bumby@evilninja.org>
Copyright (c) 2004 Martin Stenberg All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
www.lolisa.org, AI::MegaHal.
4 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Lunarstorm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lunarstorm
CPAN shell
perl -MCPAN -e shell install Lunarstorm
For more information on module installation, please visit the detailed CPAN module installation guide.