use strict;
use warnings;

=head2 buildConnectionString

Build a connection string from a dictionary of parameters.

Returns string.

=cut

sub buildConnectionString {
    my($params) = @_;
    return join(";",map { "$_=$params->{$_}" } keys %$params);
}

if (__PACKAGE__ eq "main") {
    print buildConnectionString({
	"server"   => "localhost",
	"database" => "master",
	"uid"      => "sa",
	"pwd"      => "sekret"
	}),"\n";
}
