blib/lib/auto/share/dist/Cmd-Dwarf/app/lib/App/Controller/Cli/LoadSchema.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 32 CC 2 SCAR 11.5
CC
2
Cov
0%
any
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.1
1 package App::Controller::Cli::LoadSchema;
2 use Dwarf::Pragma;
3 use parent 'App::Controller::CliBase';
4 use Dwarf::DSL;
5 use DBI;
6 use App::DB::Schema::Dumper;
7  
8 sub any {
9 # コマンドラインからしか呼び出せない
10 not_found if not is_cli;
11  
12 my $connect_info = conf('db');
13 my $dbh = DBI->connect(
14 $connect_info->{master}->{dsn},
15 $connect_info->{master}->{username},
16 $connect_info->{master}->{password},
17 $connect_info->{master}->{opts},
18 ) or die;
19  
20 print App::DB::Schema::Dumper->dump(
21 dbh => $dbh,
22 namespace => c->namespace . '::DB',
23 base_row_class => c->namespace . '::DB::Row',
24 dt_rules => qr/--------------$/,
25 );
26  
27 return;
28 }
29  
30 1;
31