If the thing you're doing involves 7 bajillion CPAN packages and cross dependencies with something large and complex, you're going to have a bad time.You might find portgen(1) somewhat useful. For example, try something like this:
doas portgen p5 Net::Hadoop::YARN