  We investigate the moment and the distribution of $L(1,\x_P),$ where $\x_P$
varies over quadratic characters associated to irreducible polynomials $P$ of
degree $2g+1$ over $\mathbb{F}_q[T]$ as $g\to\infty$. In the first part of the
paper we compute the integral moments of the class number $h_{P}$ associated to
quadratic function fields with prime discriminants $P$ and this is done by
adapting to the function field setting some of the previous results carried out
by Nagoshi in the number field setting. In the second part of the paper we
compute the complex moments of of $L(1,\x_P)$ in large uniform range and
investigate the statistical distribution of the class numbers by introducing a
certain random Euler product. The second part of the paper is based on recent
results carried out by Lumley when dealing with square-free polynomials.
