1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#! /usr/bin/perl
use strict;
use warnings FATAL => 'all';
package Beta;
{ package Beta::DB;
use base qw( Rose::DB );
__PACKAGE__->use_private_registry;
__PACKAGE__->default_type( 'main' );
__PACKAGE__->default_domain( 'test' );
__PACKAGE__->register_db(
domain => 'test',
type => 'main',
driver => 'mysql',
host => 'localhost',
database => 'beta',
username => 'beta',
password => 'betapass',
);
}
use Rose::DB::Object::Loader;
Rose::DB::Object::Loader->new(
db => Beta::DB->new,
class_prefix => "Beta::",
)->make_classes;
1;
|