Suggestion: cpanm is added to Perl core

Yuki Kimoto - SPVM Author - Dec 12 '22 - - Dev Community

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

cpanm can be used from Perl 5.8.1.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .