It shall and is hereby declared to be lawful for any land owner within this Commonwealth to construct, build and maintain, along any of the highways of this Commonwealth, fences made in whole or in part of wire, with or without barbs, subject at all times to such restrictions and prohibitions as may be imposed by the municipal authorities relative thereto.
29 P.S. § 31