All that is needed to spin the projectile is a short stretch of rifling; the spinning will continue on its own momentum regardless of barrel length.
But spinning the bullet is done for stability (and hence, range and accuracy). At short range, let's say 3 meters, the effect of a bullet would be the same, whether it is spinning or not. The idea that a bullet does damage because it "drills" into the target is a myth; in a distance of, say, 30 cm, a bullet would rotate only one time, not enough for the "spin" to have any real effect.
Jim