I suggest cpanm is added to Perl core.
For now, cpanm is attached to all SPVM repositories for portable tests using Github Action.
And if anyone knows the way to install cpanm using IO::Socket::INET, please let me know.
The following oneliner failed.
perl -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => "cpanmin.us", PeerPort => 80, Proto=> "tcp");print $socket "GET / HTTP/1.0\r\n\r\n";print <$socket>;close($sock);' > cpanm
I got the answer. The following oneliner works well.
perl -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => "cpanmin.us", PeerPort => 80, Proto=> "tcp");print $socket "GET / HTTP/1.0\r\nHost: cpanmin.us\r\n\r\n";;print <$socket>;close($sock);' > cpanm
cpanm can be used from Perl 5.8.1.
Top comments (4)
Thank you very much.
It works well.
Not recent versions: metacpan.org/release/MIYAGAWA/App-...
It is probably still possible to run an older version of cpanminus which works on 5.6. But the MetaCPAN API has changed over time so unfortunately you can expect that someday these old versions will stop being able to talk to it.
Sorry, it is 5.8.1. I fixed it.