  We provide an irreducibility test and factoring algorithm (with some
qualifications) for formal power series in the unique factorization domain
$R[[X]]$, where $R$ is any principal ideal domain. We also classify all
integral domains arising as quotient rings of $R[[X]]$. Our main tool is a
generalization of the $p$-adic Weierstrass preparation theorem to the context
of complete filtered commutative rings.
