The sequence ran like this:
1) YAML requires Test::Simple.
2) Test::Simple install fails unless you set LANG=C before running cpan (on Red Hat ES3).
3) YAML still tries to install itself after Test::Simple install bombs.
4) YAML tests get a bit confused and eat all processor and memory until machine stops responding.
Not sure where the fault lies in that lot, but it's worth knowing about if you'd rather not have to power cycle your server to get it back :) Setting LANG=C solves the whole mess, but that's possibly going around the problem rather than fixing it. I've emailed YAML's author to let them know about it, just in case it's something worth investigating.