Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (24 sloc) 0.874 kb
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/../../lib";
use MojoMojo::Schema;
use base 'Exporter';
our @EXPORT =
qw( $schema $preference_rs $page_rs @root_lower_family $root_page $number_of_family_members );
# Make the dbi connection info MATCH YOUR ENVIRONMENT.
our $schema =
MojoMojo::Schema->connect( 'dbi:mysql:database=mojomojo;host=localhost',
'mojomojo', 'pass' );
our $preference_rs = $schema->resultset('Preference');
our $page_rs = $schema->resultset('Page');
our $root_page = $page_rs->find( { id => 1 } );
our @root_lower_family = $root_page->descendants;
our $number_of_family_members = scalar @root_lower_family;
=head1 Usage
This code can be run within as:
do '$name_of_this_script'
This will load the schema set the exported variables.
Jump to Line
Something went wrong with that request. Please try again.