@ -1,23 +1,9 @@
package NGCP::Panel::Model::DB ;
use strict ;
use File::ShareDir 'dist_file' ;
use Moose ;
use MooseX::Types::Moose ;
extends 'Catalyst::Model::DBIC::Schema' ;
use Module::Runtime qw( use_module ) ;
has 'testing' = > ( is = > 'rw' , isa = > 'Bool' , default = > 0 ) ;
sub setup {
my ( $ self ) = @ _ ;
if ( $ self - > testing ) {
my $ config_location = dist_file ( 'NGCP-Schema' , 'test.conf' ) ;
use_module ( 'NGCP::Schema::Config' ) - > instance
- > config_file ( $ config_location ) ;
}
}
use warnings ;
use base 'Catalyst::Model::DBIC::Schema' ;
__PACKAGE__ - > config (
connect_info = > [] ,
@ -34,6 +20,10 @@ sub set_transaction_isolation {
) ;
}
1 ;
__END__
= head1 NAME
NGCP::Panel::Model:: DB - Catalyst DBIC Schema Model
@ -60,5 +50,3 @@ This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself .
= cut
1 ;