Skip to content

Instantly share code, notes, and snippets.

@karupanerura
Created February 23, 2014 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karupanerura/9168156 to your computer and use it in GitHub Desktop.
Save karupanerura/9168156 to your computer and use it in GitHub Desktop.
use 5.14.0;
use DBIx::Sunny;
my $dbh = DBIx::Sunny->connect("dbi:mysql:database=test", "root", "");
my ($database) = map s/^database=//r, grep /^database=/, DBIx::Sunny->parse_dsn($dbh->connect_info->[0]);
say $database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment