script/yath-ui-loader.pl untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 39 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use strict;
2 use warnings;
3  
4 our $VERSION = '0.000150';
5  
6 use Test2::Harness::UI::Config;
7 use Test2::Harness::UI::Loader;
8  
9 if (grep { m/^-+(h(?:elp)?|\?)$/ } @ARGV) {
10 print "Usage: $0 'DSN' ['USER'] ['PASSWORD']\nDSN is required, sql username and password are optional.\n";
11 exit 0;
12 }
13  
14 my $dsn = shift @ARGV // die "Must provide a DSN as the first command line argument";
15  
16 my ($user, $pass) = @ARGV;
17  
18 my $config = Test2::Harness::UI::Config->new(
19 dbi_dsn => $dsn,
20 dbi_user => $user // '',
21 dbi_pass => $pass // '',
22 single_user => 1,
23 show_user => 0,
24 );
25  
26 my $loader = Test2::Harness::UI::Loader->new(
27 config => $config,
28 procs => $ENV{LOAD_PROCS} // 1,
29 );
30  
31 $loader->load();