Mongoose::EmbeddedDocument - role for embedded documents
version 0.26
package Address; use Moose; with 'Mongoose::EmbeddedDocument'; has 'street' => is=>'rw', isa=>'Str'; package Person; use Moose; with 'Mongoose::Document'; has 'address' => ( is=>'rw', isa=>'Address' );
This role is a copy of Mongoose::Document, but flags the class as 'embedded' so that it's collapsed into a single parent document in the database.
Mongoose::Document
Read the Mongoose intro or cookbook.
From the MongoDB docs: http://www.mongodb.org/display/DOCS/Updating+Data+in+Mongo#UpdatingDatainMongo-EmbeddingDocumentsDirectlyinDocuments
To install Mongoose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mongoose
CPAN shell
perl -MCPAN -e shell install Mongoose
For more information on module installation, please visit the detailed CPAN module installation guide.