Don't bother trying to do it natively in PDF, just make your image or text with desired opacity (or transparency) in a friendly environment like GD
and export as PNG, then use PDF::API2::Resource::XObject::Image::PNG
to import it into a PDF you are constructing. I have not tested this myself, but it is how I would go about solving the problem. If you are trying to alter existing objects in a PDF, that's another ball of wax. My guess there would be to extract them, modify them externally with a tool like GD or ImageMagick, then build a new output PDF.