Every law has a moral component. The "can't legislate morality" gang is operating with wet powder.
The you can't legislate morality camp is no more misinformed than the camp that wants to legislate every aspect of morality.