A rifle, particularly a short carbine like a Sub 2000, is eminently practical for close range. They're faster to aim accurately and are more likely to incapacitate a target with the first shot.
The only exception is perhaps at ranges of < 1m where you're grappling with an assailant, in which case a snub-nosed revolver is probably the ideal choice. But that's not really a typical scenario, and I'd wager sight lines in your home are generally > 1m.
Consider that soldiers use carbines, or occasionally shotguns, when clearing rooms, not handguns.