Section 22. Whoever, with intent to commit larceny, breaks or enters or enters in the night without breaking any building or enclosure wherein is kept or confined any kind of live poultry, may be detained or kept in custody in a convenient place by the owner of the poultry, or by his agent or employee, for not more than twenty-four hours, Sunday excepted, until a complaint can be made against him for the offence and he be taken upon a warrant issued upon such complaint, and, upon conviction of such trespassing or breaking or entering shall be punished by imprisonment in the state prison for not more than three years, or by a fine of not more than five hundred dollars and imprisonment in the house of correction for not more than two years.