Fey::ORM - A Fey-based ORM (If you like SQL, you might like Fey::ORM)
A "table-based" class for the User table:
my $schema = MyApp::Model::Schema->Schema();
has_many 'messages' => ( table => $schema->table('Messages') );
MyApp::Model::Schema might look like this:
my $source = Fey::DBIManager::Source->new(
dsn => 'dbi:Pg:dbname=MyApp',
user => 'myapp',
my $schema = Fey::Loader->new( dbh => $source->dbh() )->make_schema();
Then in your application:
my $user = MyApp::Model::User->new( user_id => 1 );
$user->update( username => 'bob' );
Fey::ORM builds on top of other Fey project libraries to create an ORM focused on easy SQL generation. This is an ORM for people who are comfortable with SQL and want to be able to use it with their objects, rather than people who like OO and don't want to think about the DBMS.
Fey::ORM also draws inspiration from Moose and tries to provide as much functionality as it can via a simple declarative interface. Of course, it uses Moose under the hood for its implementation.
This is still very new software, and APIs may change in future releases without notice. You have been warned.
Moreover, this software is still missing a number of features which will be needed to make it more easily usable and competitive with other ORM packages.
You should start by reading Fey::ORM::Manual::Intro. This will walk you through creating a set of classes based on a schema. Then look at Fey::ORM::Manual for a list of additional documentation.
Please report any bugs or feature requests to email@example.com, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Dave Rolsky <firstname.lastname@example.org>
This software is copyright (c) 2011 - 2015 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Fey::ORM, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.