The following excerpt is from Pietro Damiani’s Book of Gomorrah (1048) which is mostly a writing denouncing the vices of the clergy, homosexuality being among the foremost. Damiani was a zealot for monastic and clerical reform and introduced a more severe discipline, including the practice of self-flagellation, into the house, which, under his rule, quickly attained celebrity, and became a model for other foundations.
“A cleric or monk who seduces youths or young boys or is found kissing or in any other impure situations is to be publically flogged and lose his tonsure [The practice of cutting or shaving some or all of the hair on the scalp as a sign of religious devotion or humility]. When his hair has been shorn his face to is be foully besmeared with spit and he is to be bound in iron chains. For six months he will languish in prisonlike confinement and on three days of the week shall fast on barley bread in the evening. After this he will spend another six months under the custodial care of a spiritual elder, remaining in a segregated cell, giving himself to manual work and prayers, subject to vigils and prayers. He may go for walks but always under the custodial care of two spiritual brethren, and he shall never associate with youths in private conversation more in counselling them.
“… To publish this crime, this enormous crime, is it not enough to be whipped in public, to lose his tonsure, to be shamefully shaven, to be smeared with spit, to be cruelly imprisoned for a long time and to be bound in iron chains besides? Yet finally he is also ordered to be struck with a fast of barley bread since it is right that whoever acts like a horse and a mule not eat the food of men but is to feed on the grain of mules.
For more readings, try books by Rex Hurst.