The Pali Cannon, published in Sri Lanka among 600 BC and a hundred BC, states that sexual relations, whether of homosexual or of heterosexual character, is forbidden in the monastic code, and states that any functions of soft homosexual intercourse (for instance masturbation and interfumeral sexual intercourse) does not entail a punishment but has