我刚刚在 windows server 和 windows 7 上安装了 perl6。
我想将已经在 openbsd 上运行的脚本移植到 Windows 机器上。
我测试了这段代码:
my $resp = await Cro::HTTP::Client.get('https://www.perl6.org/');
我会在两台 Windows 机器上得到这个:
C:\Users\Matthias\CommaProjects\testing>perl6 cro.pl6
Tried to get the result of a broken Promise
in block at C:\rakudo\share\perl6\site\sources\0609EA0BB03C70C2C15DB4B144D704
1C1059D14C (Cro::TLS) line 108
Original exception:
An operation first awaited:
in block at C:\rakudo\share\perl6\site\sources\A4ECA701FE96A8456AEB83692D
6B3C55AAFC964C (IO::Socket::Async::SSL) line 322
Died with the exception:
Server certificate verification failed: unable to get local issuer certificate
in block at C:\rakudo\share\perl6\site\sources\A4ECA701FE96A8456AEB83
692D6B3C55AAFC964C (IO::Socket::Async::SSL) line 322
有人可以提示如何让它运行吗?
编辑:我还用运行良好的 TLS 测试了 WWW:
use WWW;
say get 'https://httpbin.org/get?foo=42&bar=x', :SomeHeader<Value>;