The opinion of the Court was delivered by
Bell, J.A candid construction of the agreement of these parties submitting the point of their controversy for adjudication, leads, almost irresistibly, to the conclusion attained by the Court below, that the object was to ascertain the defendant’s right to recover his claim, under the facts stated, Avithout regard to the form of the action. After stating the proposed ground of defence, the agreement proceeds, “if the Court believe this is a defence sufficient in law to prevent a recovery of the bill for boarding, under the Acts of Assembly relative to selling liquor, then the above judgment to be set aside,” &c. Here is nothing said of any merely technical defence, nor is it hinted that the question of lien upon the goods replevied, was one in debate betAveen the parties. We can, therefore, Avell believe the uncontradicted assertion of the defendant’s counsel, that the form of action and the question of lien raised in this Court, was not made or in anv Avay discussed *50below, corroborated as he is by the remarks made by the President of the District Court, that “ the question whether the keeper of a boarding-house has a lien upon the property of his boarders in his possession, for their boarding account, has not been submitted by the case stated; it might, indeed, be raised by the record, but as the parties have agreed to submit their case on the single question above stated, it would be improper to give an opinion on any other.” That question is whether, as the claim, originally made by the defendant upon the plaintiff’s intestate, included a demand for spirituous liquors sold by the former to the latter, the price of boarding his family during the interval when the liquor was furnished, is recoverable ? The denial of the plaintiff’s right is not based upon the Act of 1721, which prohibits keepers of public-houses or inns to give credit for liquor or tavern reckonings, in any sum exceeding twenty shillings, under penalty of forfeiting the same. It is true, the determination in Duchman v. Hagerty, 6 Watts 66, extends this provision to cover charges for food and lodging furnished to a transient guest, at the several times when the liquor was also credited. But the present defendant is not within the purview of the Acts, for he is not an innkeeper, and is,-therefore, not of that class the statute was made to restrain. Besides, since the Act of 11th March, 1834, regulating inns and taverns, there can be little doubt a tavernkeeper may sustain action for the price of boarding and lodging enjoyed by a permanent resident, though the latter be also a debtor for liquor furnished. It was so decided by the District Court of Philadelphia, in Seattergood v. Waterman, 2 Miles 323, under the provisions of the later Act; and, as it seems to me, with entire propriety. This act, however, prohibits, under certain penalties, any person from keeping an inn or tavern without license previously obtained in the manner pointed out; and subjects to punishment by indictment all unlicensed persons who shall sell spirituous or vinous liquors by less measure than a quart at one time. It is insisted that as during the period when the debt for boarding was contracted by the defendant’s intestate, the defendant wras acting in direct violation of these prohibitions, by professing to keep an inn or tavern in the house where the boarding and lodging was furnished, the contract sued on springs from an illegal and prohibited condition of things, and is consequently void. It is undoubtedly true, that a contract growing out of a transaction immediately connected with, or tending to encourage a breach of the law, cannot be enforced. Every contract, as was observed by Lord Holt, made for or about any matter which is prohibited and made unlawful by statute is a void contract, though the statute doth not mention that it shall be so, but only inflicts a penalty on the defaulter: Bartlett v. Viner, Carth. 252 Such was the case in Badgley v. Beale, 3 Watts 263, where the plaintiff sued on an engagement to act for wages as marker at an illicit *51billiard table: Mitchell v. Smith, 1 Barr 117, where the contract was for the purchase of a prohibited Connecticut title; Biddis v. James, 6 Bin. 321, where the plaintiff sought to recover the prize drawn under an illegal lottery ticket; and others of the same stamp cited for the plaintiff.
But this principle has no application where the ground of the action has no immediate or necessary connexion with the thing prohibited. The disabling illegality must enter into, and, at least in some degree, contribute to the creation of the impeached contract, in order to its avoidance. It is not sufficient for such an effect, that he who avers the contract is, at the same time, engaged in the prosecution of a prohibited trade. The same individual may pursue several occupations, some of which are unlawful, but that fact will not necessarily vitiate all his transactions with others. So a demand may be remotely connected with an illegal transaction or business, and yet capable of being enforced at law. The test is said to be, whether the plaintiff requires the aid of the illegal transaction, or must show the prosecution of the prohibited pursuit, in order to establish his case ? Chitty on Con. 694; Swan v. Scott, 11 Ser. & R. 166. If not, his misconduct in another and distinct particular will not bar his recovery, though there be an accidental relation subsisting between the prohibited and the permitted pursuit. Of this position, the ease before us may be cited as an illustration. The plaintiff’s intestate improperly pursued the prohibited business of an unlicensed tavernkeeper, and subjected himself to be indicted as an illegal vender of spirituous liquors. But he also practised the lawful business of a boardinghouse keeper, which could not be rendered illegal by the fact that transient guests were received and entertained in the same house. Though accidentally connected, the two pursuits may be regarded as in their nature distinct. The employment of the former is to furnish subsistence and lodging to permanent residents; of the taverner, to entertain temporary guests. Though, perhaps, not so well understood in Europe, in this country the difference between these pursuits is familiar to every one, and the fact that they are frequently combined under the same roof, will not confound them. They are most frequently exercised by distinct persons, and at distinct places, but they may be, and often are, pursued by the same individual in the same building. It follows, that an unlicensed innkeeper may, at the same time, lawfully follow the other business ; and that he may recover a claim for boarding, properly so called, is evidenced by the application of the test, that his illegal occupation is not necessarily brought to view as the foundation of claim in an action to recover the price of boarding.
But it is urged, that having illegally sold liquor upon credit, to the plaintiff’s intestate, the present defendant ought not to recover, since the price of the liquor so sold, constituted a portion of the *52debt at one time claimed to be due, thus tainting the whole transaction with the statutory offence. It is true, that if any part of an indivisible promise, or any part of an indivisible consideration for a promise, is illegal, the whole is void: Filson’s Trustees v. Himes, 5 Barr 452. Or, as it is elsewhere expressed, if a contract is entire upon several considerations, some of which are illegal, the whole contract is null: Frazier v. Thompson, 2 W. & Ser. 235. But where a claim consists of several distinct items, some good and others bad, or where the transaction is of such a nature that the good part of the consideration may be separated from the bad, the common law discriminates between them, by permitting a recovery for the former while it repudiates the latter. Of the appreciation of this principle our own reports furnish several examples. Among these, that which is more nearly assimilated in its features to the present ease, is Yundt v. Roberts, 5 Ser. & R. 139. It was an action upon a promissory note, given for an ascertained sum upon settlement of accounts including a tavern reckoning. The latter was irrecoverable, being prohibited by statute, but as the sum called for by the note was capable of division, by inquiry dehors the instrument, a recovery was had of so much of the consideration as was unaffected by any illegality. These decisions were but in obedience to a long-ascertained principle, which must govern the present controversy. The’claim, once preferred for liquor, is distinguishable, and may be easily separated from that portion of the demand now sued for. The latter may, consequently, be recovered.
Judgment affirmed.