We consider the simulation of distributions that are a mixture of discrete
and continuous components. We extend a Metropolis-Hastings-based perfect
sampling algorithm of Corcoran and Tweedie to allow for a broader class of
transition candidate densities. The resulting algorithm, know as a "class
coupler", is fast to implement and is applicable to purely discrete or purely
continuous densities as well. Our work is motivated by the study of a composite
hypothesis test in a Bayesian setting via posterior simulation and we give
simulation results for some problems in this area.