If you have a long torso, then you need a long top tube. Otherwise, you will end up sitting too high on the bike and you'll feel cramped. You could put on a longer handlebar stem. But if you use a really long stem, you'll be moving too much of your weight forward over the front wheel, which will adversely affect handling. You'd be much better off with a frame that has a longer top tube.
Many women have the opposite problem.
Again, we're talking about top tube length. If the top tube is too long, you'll be stretched out uncomfortably too far. Many women try to compensate by doing creative things with the stem. I've seen women turn the stem around backwards, which can't be good for handling. I've often seen women on frames that are too short with an extra long seat post and a high-rising mountain bike stem.