Are you on Windows? If so, the following should work from a command prompt:
cpan install IO::Tty 1> install_test.txt 2>&1
That's basically piping STDERR to STDOUT and then STDOUT to a file (install_test.txt). However, you won't see the output on the screen at the same time.
If you have PowerShell installed and really want to display messages and send them to a file, you can use the tee-object cmdlet like the following:
cpan install IO::Tty 2>&1 | Tee-Object -FilePath C:\perl_stuff\install_test2.txt
Again, the "2>&1" is piping STDERR to STDOUT and then the tee-object is sending the output to STDOUT and a file at the same time.