NAME
Melody::Data - Melody-Data is an easy to use API for accessing OpenMelody and MovableType CMS data using DBIx::Class.
VERSION
Version 0.001
SYNOPSIS
Nothing special, simply a means to access MovableType or OpenMelody data from outside using DBIx::Class.
use Melody::Data;
my $md = Melody::Data->new('dbi:mysql:mtdb', 'root');
my $blog = $md->blog(1);
my @assets = $blog->assets;
my @authors = $blog->authors;
Currently Configured
This module is a work in progress, this section of the documentation describes which OpenMelody/MovableType DBIx::Class classes have been configured with relationships.
currently configured classes
METHODS
new
the `new` method is used to instantiate a new Melody::Data object.
new arguments
new usage and syntax
Melody::Data->new(@connection_string);
takes 1 argument
1st argument - required
@connection_string - DBIx::Class compatible connection string
example:
my $md = Melody::Data->new('dbi:mysql:mtdb', 'root');
my $blog = $md->blog(1);
my @assets = $blog->search_related('assets')->all;
blog
the `blog` method is used to return the resultset of the specified blog by name or id.
blog arguments
blog usage and syntax
my $blog = $md->blog($blog_ident);
takes 1 argument
1st argument - required
$blog_ident - blog name or id
example:
This method is use to return the resultset of the target blog.
my $blog = $md->blog(1);
print $blog->blog_name;
VARIABLE TABLE
@connection_string
# The @connection_string array is a compatible DBIx::Class connection
# string.
my @connection_string = ($dbi_dsn, $user, $pass, \%dbi_params);
$blog_ident
# The blogs name (case-insensative) or id (found by examining the url
# once logged into the control panel of MovableType or Melody).
my $blog_ident = 1;
my $blog_ident = 'my new blog';
AUTHOR
Al Newkirk, <awncorp at cpan.org>
BUGS
Please report any bugs or feature requests to bug-melody-data at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Melody-Data. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Melody::Data
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2009 Al Newkirk, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.