Today I was installing a module within CPAN and I got systematically the same error ending as following:
Catching error: "Undefined subroutine &Compress::Zlib::gzopen called at /System/Library/Perl/5.8.8/CPAN/Tarzip.pm line 122.\cJ" at /System/Library/Perl/5.8.8/CPAN.pm line 359
CPAN::shell() called at /usr/bin/cpan line 198
After consulting my "Perl menthor" (hehe!), he asked me if I had installed the 2009-001 Mac OS X Security Update. Well it seems that this Update troubles the IO module.
Let me explain: each time you run an update with Software Update, it simply overrides your existing files. This is the main reason you shouldn't override the system Perl installation with a fresh one compiled from source, for instance.
So, getting back to our subject, let me explain how I solved that.