Skip to content
Snippets Groups Projects
Commit d470e57f authored by Laura Clarke's avatar Laura Clarke
Browse files

change to throw if dbpattern isn't found
parent 655186f6
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ my $dbh = DBI->connect( $dsn, $user, $pass );
my @dbnames = map {$_->[0] } @{ $dbh->selectall_arrayref( "show databases" ) };
my @dbs = grep {$_ =~ /$dbpattern/} @dbnames;
die("Haven't found any real dbs from $dbpattern") if(!@dbs);
foreach my $db (@dbs) {
warn "using $db";
$dbh->do("use $db");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment