This proceeding was brought by the relator, a retail milk dealer in the city of Shelton, to compel the milk inspector of the city to approve his application for a license to sell milk and cream for the year 1929, and to compel the city clerk to issue to him such a license. The application for the writ alleges that the relator has for many years been a retail milk dealer in the city of Shelton, duly licensed in accordance with the provisions of an ordinance of December 15th, 1923, which provided that each license issued thereunder should expire on December 31st of each year; that on December 29th, 1928, in compliance with the terms of the 1923 ordinance, he made written application for a license for the year 1929, and applied to the respondent Roberts, milk inspector of the city, for the indorsement upon the application of his approval of the same, provided he found upon investigation that the relator's milk and cream were pure and wholesome, and that Roberts refused to indorse his approval upon the application though declaring that he was satisfied that relator's milk and cream were pure and wholesome. The relator further alleges that on December 31st, 1928, he presented his application to the respondent Edwards, the city clerk, and requested a license for the year 1929, which the latter refused to issue, stating that he had been instructed not to issue any license to the relator for the year 1929 unless and until the latter had complied with the provisions of an ordinance adopted on November 19th, 1928, by the *Page 252 terms of which it became unlawful after January 1st, 1929, to sell milk or cream in the city of Shelton except from tuberculin tested cattle, or unless it should have been pasteurized. Such ordinance, a copy of which was annexed to the application for the writ, did so provide and it is conceded that the relator had not complied with its requirements. An alternative writ of mandamus was issued, and the respondents, on January 4th, 1929, filed a motion to quash upon the ground, among others, that it appeared that relator had not complied with the ordinance of November 19th, 1928, which was then in full force and effect, and that he was not entitled to a license until he was ready and willing to comply with its requirements. The court sustained the motion to quash, and the relator failing to plead over, entered its judgment dismissing the alternative writ.
Upon the facts set forth in the application for the alternative writ, which are admitted by the motion to quash, it is clear that the relator had complied with the provisions of the ordinance controlling the issuance of licenses to sell milk and, except for the effect of the ordinance of November 19th, 1928, was entitled to have his application approved by the milk inspector and a license issued to him by the city clerk. The two ordinances should be read together. The 1928 ordinance, which had been adopted before the relator made his application, forbade the sale at retail after January 1st, 1929, of any milk or cream except from tuberculin tested cattle, or unless it had been pasteurized, and one of the penalties for the violation of its provisions was the revocation of the license issued under the 1923 ordinance. The 1923 ordinance provided that each license issued thereunder should expire on the 31st day of December, and the application of the relator was for a license for the year 1929. It is apparent *Page 253 then that the relator, whose milk had not been pasteurized and was not from tuberculin tested cattle, was seeking a license from the officials of the city of Shelton to sell milk and cream in violation of an ordinance of the city during the entire year of 1929 save only upon the first day thereof. If the 1928 ordinance had provided that the sale of milk not pasteurized or not from tuberculin tested cattle should be unlawful on and after January 1st, 1929, it would scarcely be claimed that the relator was entitled to a license to sell in violation of the ordinance on the ground that his application for the license was made prior to that date. His claim then comes down to this, that since, if a license had been issued to him, he could legally have operated under it on the first day of January, 1929, the city officials were bound to give him a license for the entire year. The writ of mandamus is a prerogative writ. It is not demandable as a matter of strict right and is subject to the exercise of a sound legal discretion though it will not be refused when the applicant has a clear legal right and a substantial matter is involved.Chesebro v. Babcock, 59 Conn. 213,22 A. 145; State ex rel. Costelo v. Middlesex Banking Co.,87 Conn. 483, 487, 88 A. 861. The most that the relator was entitled to, as a matter of strict right, was a license to sell milk on the first day of January, 1929, which was the only day upon which he could legally sell it. This was not what he asked for and doubtless not what he wanted. The writ will not issue to compel a technical compliance with the letter of the law. If the right sought to be enforced is or has become a mere abstract right, the enforcement of which will be of no substantial or practical benefit to the petitioner, the writ will not issue though otherwise the applicant would be entitled to it. 38 Corpus Juris, 586, 587. The license, if one had been issued to the relator upon *Page 254 his application, would have been a useless thing after the first day of January, 1929, since it is not to be presumed that he would violate the law by continuing to sell his unpasteurized milk after that date, and if he did his license was subject to immediate revocation. He was not entitled to a license to sell milk during the year 1929, which was the license he applied for, and the city officials were justified in refusing to issue such a license to him.
Though he had a legal right upon this application to have a license issued to him on December 31st, 1928, under which he could sell milk on January 1st, 1929, had he asked for it, the court would not have been justified in issuing a peremptory writ when the motion to quash was heard, which was on January 11th, 1929. Such action would have been in effect an order to the officials of the city to violate an ordinance then in full force and effect. Needless to say the court will not by mandamus compel public officials to perform an act which would result in a violation of law.Supervisors v. United States, 85 U.S. (18 Wall.) 71, 77; Chicot County v. Kruse, 47 Ark. 80, 14 S.W. 469; High's Extraordinary Legal Remedies (3d Ed.) § 26; 2 Spelling on Extraordinary Remedies (2d Ed.) § 1318; 38 Corpus Juris, 557. Nor will it issue its writ of mandamus unless it is within the legal power of the respondent to perform the act commanded. State v.Towers, 71 Conn. 657, 663, 42 A. 1083. As a general rule, in actions seeking legal relief, the action stands or falls by the facts and governing law existing at the time of bringing suit. But in mandamus proceedings matters occurring after suit is brought can properly be considered in determining whether the writ shall be made peremptory. State ex rel. Bulkeley v. Williams,68 Conn. 131, 155, 35 A. 421. Mandamus is an ancient common law writ, but its issuance is governed *Page 255 largely by equitable considerations, and it has been generally held that it will be denied where, by reason of events occurring subsequent to the commencement of the proceedings or because of the lapse of time, the relief sought would be nugatory or unavailing. Stateex rel. Crabbe v. Miller, 129 Mo. App. 390,108 S.W. 603; People ex rel. Chance v. Burke, 274 Ill. 55;Cutcomp v. Utt, 60 Iowa 156, 14 N.W. 214; Sullivan v. Secretary of the Commonwealth, 233 Mass. 543,124 N.E. 422; 2 Spelling on Extraordinary Remedies (2d Ed.) § 1377; 38 Corpus Juris, 551, 587; High's Extraordinary Legal Remedies (3d Ed.) p. 456, § 475.
Thus in Hall v. Steele, 82 Ala. 562, 2 So. 650, where the legislature had enacted a law prohibiting the sale of intoxicating liquors, which did not go into effect until thirty days after the adjournment of the legislature, and an application for a license was made about a week before the expiration of the thirty days, and denied by the licensing authorities, the court, in denying the applicant a writ of mandamus, said (p. 566): "If it were conceded that the petitioner was entitled to a license when he made application, and to relief when these proceedings were instituted, the act is now in force, and the time has expired when the petitioner had a clear legal right to a license." In Dexner v.Houghton, 153 Minn. 284, 190 N.W. 179, an applicant sought a writ of mandamus to compel a building inspector to issue to him a building permit. The building inspector refused the permit because he had been instructed not to issue any permits for the erection of buildings in the locality where the applicant's property was located until the common council had passed upon a petition to establish a restricted residential district in that locality. The district had not been established when the proceeding was started, but had been established when the hearing took place. The *Page 256 court held that the right to the writ might be affected by circumstances occurring after it was sued out, and that it might be refused in the exercise of a sound judicial discretion when, if issued, it would be of no avail.
State ex rel. Foote v. Bartholomew, 103 Conn. 607,132 A. 30, and 106 Conn. 698, 138 A. 787, cited upon the relator's brief, was an application for a writ of mandamus to compel a board of relief to add certain real estate to the assessment list of the town, and one of the objections to the issuance of the writ was that the time within which the board could complete its duties under the statute had expired. It appeared that the time for the completion of the work of the board did not expire until the last day of May, 1925, and that the motion to quash the alternative writ was decided May 19th, 1925, and we held that the passing of subsequent time necessary to conduct the litigation did not prevent the granting of legal relief.
The trial court was right in sustaining the motion to quash and in dismissing the alternative writ when the relator failed to plead over.
There is no error.
In this opinion the other judges concurred.