You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-schema/lib/NGCP/Schema/carrier.pm

28 lines
770 B

package NGCP::Schema::carrier;
use Sipwise::Base;
our $VERSION = '1.001';
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
extends 'DBIx::Class::Schema';
__PACKAGE__->load_namespaces;
# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-04-09 12:33:48
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2tiLLQMoqYYiicae6bptbA
use MooseX::ClassAttribute qw(class_has);
class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub {
return NGCP::Schema::Config->instance;
});
method connection {
my %connect_info = %{ $self->config->as_hash->{carrierdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);