Unfortunately, the compatibility symlinks are not sufficient. The problem is that other perl packages such a po4a are installing their modules into $out/lib/perl5/site_perl/5.26.1, which conflicts with the compatibility symlink that we're installing in perl.
When perl and po4a are put together into a profile, po4a has a directory <PO4A>/lib/perl5/site_perl/5.26.1 and perl has its compatibility symlink in the same relative location. The (guix build union) code follows perl's symlink to its target directory <PERL>/lib/perl5/site_perl/5.26.2 and merges that with <PO4A>/lib/perl5/site_perl/5.26.1 to form <PROFILE>/lib/perl5/site_perl/5.26.1, but that not in any of the paths. I'm now trying a different approach: hack the replacement perl to think it is version 5.26.1, although it is actually 5.26.2. I'll report back soon. Mark