For the purpose of registration and voting, no person shall be deemed to have gained a residence by reason of his presence, or lost it by reason of his absence, while employed in the service, either civil or military, of this State or of the United States, nor while engaged in the navigation of the waters of the State or of the United States, or on the high seas, nor while a student of any institution of learning, nor while kept in any poorhouse or other asylum at public expense, nor while confined in public prison, except that any veteran who resides in a home for disabled and indigent soldiers and sailors, operated and maintained by the Commonwealth of Pennsylvania, and who possesses all the qualifications for voting, may gain a residence for registration and voting at the home for disabled and indigent soldiers and sailors. The provisions of this amendment shall not be construed to affect the voting rights of bedridden or hospitalized veterans who choose to vote as absentee electors by the use of veteran's official ballots.
25 P.S.§ 2813