NAME
WWW::Myspace::Data - WWW::Myspace database interaction
VERSION
Version 0.01
SYNOPSIS
This module is the database interface for the WWW::Myspace modules. It imports methods into the caller's namespace which allow the caller to bypass the loader object by calling the methods directly. This module is intended to be used as a back end for the Myspace modules, but it can also be called directly from a script if you need direct database access.
CONSTRUCTOR AND STARTUP
new()
new() creates a Class::DBI::Loader object, based on parameters which are passed to it by a hash reference. You can use any parameters which you would normally pass to Class::DBI::Loader For example, if you are using MySQL:
my %config = (
dsn => 'dbi:mysql:database_name',
user => 'user_name',
password => 'password',
namespace => 'WWW::Myspace::Data',
);
my $data = WWW::Myspace::Data->new( \%config );
# Or
# if you are using SQLite
my %config = (
dsn => 'dbi:SQLite:dbname=/path/to/dbfile',
namespace => 'WWW::Myspace::Data',
);
my $data = WWW::Myspace::Data->new( \%config );
loader()
Returns the Class::DBI::Loader object. Handy if you want to access the database directly.
my $loader = $data->loader();
# get a list of all your friends
my @friend_objects = WWW::Myspace::Data::Friends->retrieve_all;
update_friends
The "friends" table in your local database stores information about myspace friends, shared among all accounts using your database. This lets you store additional information about them, such as their first name, and is also used by WWW::Myspace methods and modules to track information related to friends.
update_friends makes sure that all myspace users that are friends of your account are represented in the local "friends" table.
my $data = new WWW::Myspace::Data( \%config );
$data->update_friends;
AUTHOR
Olaf Alders, <olaf at wundersolutions.com>
BUGS
Please report any bugs or feature requests to bug-www-myspace at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Myspace. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
NOTES
This module is still in its infancy. It does a lot of cool stuff, but the interface is still subject to change. Please keep this in mind when upgrading
TO DO
This module is in developer mode. We still need to add a database schema and integrate it with the WWW::Myspace modules.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::Myspace::Data
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
ACKNOWLEDGEMENTS
Many thanks to Grant Grueninger for giving birth to WWW::Myspace and for his help and advice in the development of this module.
COPYRIGHT & LICENSE
Copyright 2006 Olaf Alders, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.