Opinion by
Mb. Justice McCollum,
The road of the appellant company passes through the land of the appellee and this action was brought by the latter to recover the cost of building a fence on said land along the lino of said road. The road was located in 1853 and the damages to the land were assessed at ten hundred and sixty-six dollars, and paid to Nathaniel Smith who then owned the property and to whose rights the appellee has succeeded. In ascertaining the amount of the damages, the burden of fencing was a proper element to be considered, and the presumption is that it entered into and formed a part of the sum awarded. The company, having once paid for this burden, ought not in equity to bear it, but it should rest upon the owner who was compensated for it or upon the parties deriving title to the land through him. Whilst the correctness of this view is conceded, it is contended that the Act of March 28, 1868, P. L. 514, entitled “ An Act for the protection of farmers and owners of cattle, horses, sheep and swine along the line of railroads in the county of Warren,” which, by a supplement passed April 17, 1869, P. L. 1125, was extended to the counties of Bradford, McKean and Yenango, takes the burden from the owner of the land and casts it upon the railroad company. This act requires all railroad companies in the counties to which it is applicable *622to “ construct and keep in repair a good and sufficient fence, at least four feet high, along their track, except through incorporated boroughs,” and provides that if any railroad company shall neglect or refuse to discharge its duty in this respect any person on compliance with its provisions respecting notice may build the fence and recover from the company the cost of building it, together with ten per centum thereon. It applies to railroads constructed and in operation before its passage and to railroads constructed thereafter: Shurley v. Railroad Co., 121 Pa. 511. It was “ designed not only for the protection of the property of persons residing in the vicinity of railroads, but also for the protection of the limbs and lives o£ those traveling over or using such railroads: ” R. R. Co. v. Mead, 8 W. N. 206. A similar statute for Erie county, approved April 13, 1868, P. L. 1022, was attacked in Pa. R. R. Co. v. Riblet, 66 Pa. 164, on the ground that it was unconstitutional, but it was sustained as a police regulation. The case last cited was an action for the penalty prescribed for the neglect of the company to rebuild a fence destroyed by fire communicated by its own locomotives, and the question of the ultimate responsibility for the construction and maintenance of it. was not decided. The enactment which was challenged in that case and the legislation relied on to support this action are alike in purpose and differ only in the methods provided for its acomplishment. They are both within and a proper exercise of the police power of the state, and designed for the protection of persons and property. They do not avowedly deal with or impair the rights of parties under contracts between them, express or implied, and an intention to interfere with such rights will not be imputed to the legislature, unless it is plainly manifest from the language of the statute.
The burden of fencing created by the location and construction of a railroad is a charge upon and detracts from the value of the farm through which it passes. This burden may not be limited to, but it certainly includes, the fencing called for by the act under consideration. When the landowner in a proceeding for the assessment of his damages has received compensation for the burden thus imposed, his claim for all fencing made necessary by the construction of the railroad is satisfied, and for such fencing thereafter, whether it is required for his *623own convenience and protection or for the public safety, he can have no valid claim against the company. It is work done in partial discharge of a burden on his own land, for which he has already been paid. His successor in the ownership of the land, whether as grantee, heir or devisee, takes it cum, onere and has the same rights and duties in relation to the fencing of it, as the person from whom he derived title. As already intimated we are of opinion that the statute under consideration does not undertake to settle the question of the ultimate responsibility for fencing in a case like the present. If it assumed to do so, and required the appellant to finally bear this burden, it would be fairly open to the objection that the legislature had not the constitutional power to enact it. Legislation which demands that one person shall assume and pay the private debt of another is void for want of such power; and an act to compel a railroad company to bear a burden resting upon the land of another and for which it has once compensated him, would be in the same category.
The specifications of error are sustained.
Judgment reversed.