I'm trying to map this cylindrical pipe that looks like this:

the problem is that it's curved so when I do cylindrical mapping I get some strange texturing on the slanted regions. I'm wondering if there's a way to make the UV cylindrical map follow along the pipe. you guys know what I mean?
any help great thanks,
Dan