We'll hit this one fast and hard, because honestly? There are only a few legitimate reasons to use the perfect progressive verb form. And there's probably a better, simpler way to say the same thing. But for the sake of follow-through, here you go.
Just like the perfect form, you'll use a form of "have," to indicate that an action has ALREADY been completed before the time in question.
Perfect: I have laughed.
I had laughed. I will have laughed.
And just like your progressive forms, you'll use "-ing" to show CONTINUOUS action in that time frame.
Progressive: We are discussing.
We were discussing. We will be discussing.
Only with perfect progressive, you combine them, clunkifying your sentence in an abhorrent fashion.
Present perfect progressive:
"has" or "have" + "been" + (verb)-ing
I have been telling my boys to go to bed for the last thirty minutes, so I am justifiably aggravated.
In fiction, I'd much rather read, "I already told them to go to bed. I'm done. It's on now." Of course, that is clearly fiction, because my children are perfect, and I am a mother who always does the right thing. (Oh, wait. I'm confused. One is fiction, one is non-fiction. You decide.)
Past perfect progressive: "had" + "been" + (verb)-ing
The unpredictable weather in those mountains endangered everyone without partiality. Rafe had been kayaking the day before the blizzard. He wasn't prepared, and the blinding snow kept him from the safety of the cabin.
There are times when this is necessary. If a writer chooses to tell the story in simple past tense and needs to indicate that something happened earlier--a memory, a flashback--this might be a good option. But don't overuse them. You can segue into the memory sequence or flashback and--once it's well-established--revert back to simple past. Just be sure it's clear when you come back to the main story timeline itself.
Now future perfect progressive:
"will have" + "been" + (verb)-ing
By the time you get to this example, you will have been reading for a solid minute, so it's time for me to sign off.
Thanks to the Roosevelts and Julie Edgely for the images.