Skip to content

Instantly share code, notes, and snippets.

@larsen
Created September 30, 2011 16:30
Show Gist options
  • Save larsen/1254290 to your computer and use it in GitHub Desktop.
Save larsen/1254290 to your computer and use it in GitHub Desktop.
package TestConn;
use Dancer ':syntax';
use DBI;
my $dbh = DBI->connect( ... );
our $VERSION = '0.1';
get '/' => sub {
my $sth = database->prepare( "...");
$sth->execute;
my $count = $sth->fetchrow_hashref;
return $count->{ count };
};
true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment