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.