use base 'CGI::Application'; use strict; sub setup { my $Self = shift; ... $Self->param ( 'mydbh' => DBI->connect ( ... ) ); }