  An old theorem of Weil and Kodaira says that for a compact K\"ahler manifold
$X$ there is a closed logarithmic $1$-form with residue divisor $D$ if and only
if $D$ is homologous to zero in $H_{2n-2}(X,\mathbb C)$. In the first part of
this paper, we generalize the above theorem to general compact complex
manifolds by showing that the necessary and sufficient condition in general is
described by a holomorphic invariant called the $\mathcal Q$-flat class. Next,
we prove that the holomorphic criterion is reduced to the topological one when
$X$ has Property $(H)$. Since all K\"ahler manifolds have Property $(H)$, this
gives an alternative proof of Weil and Kodaira's original theorem. Then, we
prove some decomposition theorems for closed meromorphic $1$-forms by applying
the above general theorem. In the second part of the paper, we turn to the
study of pluriharmonic functions on projective manifolds and classify all the
pluriharmonic functions with mild singularity.
