And in Perl ... 

$c->register(IOC::Service->new(
  'db_conn' => sub { DBI->connect('dbi:mysql:test', '', '') }
));
$c->get('db_conn')