32 So, too, the liberty of thinking, and of publishing, whatsoever each one likes, without any hindrance, is not in itself an advantage over which society can wisely rejoice. On the contrary, it is the fountain-head and origin of many evils. Liberty is a power perfecting man, and hence should have truth and goodness for its object. But the character of goodness and truth cannot be changed at option. These remain ever one and the same, and are no less unchangeable than nature itself. If the mind assents to false opinions, and the will chooses and follows after what is wrong, neither can attain its native fullness, but both must fall from their native dignity into an abyss of corruption. Whatever, therefore, is opposed to virtue and truth may not rightly be brought temptingly before the eye of man, much less sanctioned by the favor and protection of the law. A well-spent life is the only way to heaven, whither all are bound, and on this account the State is acting against the laws and dictates of nature whenever it permits the license of opinion and of action to lead minds astray from truth and souls away from the practice of virtue. To exclude the Church, founded by God Himself, from life, from laws, from the education of youth, from domestic society is a grave and fatal error. A State from which religion is banished can never be well regulated; and already perhaps more than is desirable is known of the nature and tendency of the so-called civil philosophy of life and morals. The Church of Christ is the true and sole teacher of virtue and guardian of morals. She it is who preserves in their purity the principles from which duties flow, and, by setting forth most urgent reasons for virtuous life, bids us not only to turn away from wicked deeds, but even to curb all movements of the mind that are opposed to reason, even though they be not carried out in action.
Source: Immortale Dei (Vatican.va)