Back in the day (late 90s if I’m remembering correctly), after experiencing it for a while, when encountering a CPAN package I would roll my eyes… and look elsewhere. I had endless trouble just getting things to build reliably. I always ended up feeling like it took much longer to use CPAN than it did to just download the script. Maybe I am alone in that, but that was my experience. And, of course, much has probably changed since then; in particular the unixverse is much more homogenous than it used to be.
With NPM, I just roll my eyes. But generally speaking it works.
NPM certainly has native builds but with my use case involving the predominant targets (Linux and MacOS) I just don’t hit the barriers I used to.
That said, by the late 90s my desktop was Linux and I still avoided CPAN!