File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,14 @@ A dsn to connect with. By default uses the DSN for the test database.
82
82
=cut
83
83
84
84
sub getDatabaseHandle {
85
- my $self = shift ;
86
- my %options = @_ ;
85
+ my $self = shift ;
86
+ my %options = @_ ;
87
87
my $password = $options {password };
88
- my $mysql = $self -> wreConfig-> get(" mysql" );
88
+ my $mysql = $self -> wreConfig-> get(" mysql" );
89
89
my $username = $options {username } || $mysql -> {adminUser };
90
- my $dsn = $options {dsn } || ' DBI:mysql:' .$mysql -> {test }-> {database }.' ;host=' .$mysql -> {hostname }.' ;port=' .$mysql -> {port };
91
- my $db = undef ;
90
+ my $test_db = $mysql -> {test }-> {database } || ' test' ;
91
+ my $dsn = $options {dsn } || ' DBI:mysql:' .$test_db .' ;host=' .$mysql -> {hostname }.' ;port=' .$mysql -> {port };
92
+ my $db = undef ;
92
93
eval {
93
94
$db = DBI-> connect ($dsn , $username , $password , {RaiseError => 1});
94
95
};
You can’t perform that action at this time.
0 commit comments