The situation is similar for Perl. You can install perl separately via homebrew or macports, or via plenv (https://github.com/tokuhirom/plenv) or perlbrew (perlbrew.pl). This is preferred anyway since in the last few OSX releases, Apple has edited some of the internal Perl toolchain modules (such as ExtUtils::MakeMaker) in a broken way without talking to the developer team (or even responding to repeated pleas to fix their broken changes).