Compiling Perl v5.8 on Debian Slim

I need a container for Perl v5.8, and I want it to be as small as I can make it. Starting with debian:bookworm-slim, I’d download the v5.8 source, modify it with patchperl, then compile it. But, there were problems.