macOS Big Sur:意外的产品版本 11.1。如何修补 perlbrew?

macOS Big Sur: Unexpected product version 11.1. How to patch perlbrew?

我刚刚将我的 Macbook Air 从 10.15 更新到 11.1,然后尝试使用 perlbrew 安装 perl 5.32:

$ perlbrew install perl-5.32.0
Installing /Users/hakonhaegland/perl5/perlbrew/build/perl-5.32.0/perl-5.32.0 into ~/perl5/perlbrew/perls/perl-5.32.0

This could take a while. You can run the following command on another shell to track the status:

  tail -f ~/perl5/perlbrew/build.perl-5.32.0.log

Installation process failed. To spot any issues, check

  /Users/hakonhaegland/perl5/perlbrew/build.perl-5.32.0.log

构建日志显示:

[...]
Which of these apply, if any? [darwin]

*** Unexpected product version 11.1.
***
*** Try running sw_vers and see what its ProductVersion says.

##### Brew Failed #####

幸运的是,此问题已在 Perl 开发分支中得到修复,请参阅 Add 11.x support for darwin.sh。那么现在如何将此修复程序反向移植到 Perl 5.32.0 并与 perlbrew 一起应用?

这里可以用patchperl吗?

看来我只需要 运行:

$ perlbrew install-patchperl

/Users/hakonhaegland/perl5/perlbrew/bin/patchperl already exists, are you sure to override ? [y/N] [N] y

patchperl is installed to

    /Users/hakonhaegland/perl5/perlbrew/bin/patchperl

然后再运行

$ perlbrew install perl-5.32.0