In perl-module.eclass, it calls 'perl Makefile.PL CC="$(tc-getCC)"' (along with a bunch more parameters), with the intention of using the compiler returned with tc-getCC. However, with a very simple experiment using the dev-perl/Locale-gettext package, we can determine that this isn't exactly correct: $ perl Makefile.PL CC=false checking for gettext... yes checking for dgettext... yes checking for ngettext... yes checking for bind_textdomain_codeset... yes Generating a Unix-style Makefile Writing Makefile for Locale::gettext Writing MYMETA.yml and MYMETA.json $ CC=false perl Makefile.PL checking for gettext... no checking for gettext in -lintl... no gettext function not found. Please install libintl at Makefile.PL line 18. It turns out, it grabs the CC variable from the environment, not from the command line arguments. I'm not sure if it's possible to pass it through the command-line environments, but I am sure that it's currently not working as intended.
It's more complicated than that. It depends on which build system is being used (Perl has many with the same interface, even). Anyway, it indeed looks wrong for locale-gettext.