Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created June 7, 2018 18:34
Show Gist options
  • Save jnthn/b5168f761165d78bb33721f3f51e8790 to your computer and use it in GitHub Desktop.
Save jnthn/b5168f761165d78bb33721f3f51e8790 to your computer and use it in GitHub Desktop.
my $conninfo = join " ",
('dbname=' ~ (%*ENV<DB_NAME> || die("missing DB_NAME in environemnt"))),
("host=$_" with %*ENV<DB_HOST>),
("user=$_" with %*ENV<DB_USER>),
("password=$_" with %*ENV<DB_PASSWORD>);
my $db = Database.new(:$conninfo, :converters<DateTime>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment