  An asymptotic formula for the sum $\sum L(1,\chi)$ is established for a
family of hyperelliptic curves of genus $g$ over a fixed finite field
$\mathbb{F}_q$ as $g\rightarrow\infty$ making use of the analogue of the
approximate functional equation for such $L$--functions. As a corollary, we
obtain a formula for the average of the class number of the associated rings
$\mathbb{F}_{q}[T,sqrt{D}]$.
