Search code examples
macosperlosx-mavericksperl-module

How to downgrade Perl on Mac OS X Mavericks


The newly release Mavericks has removed the deprecated module "Switch.pm" from its repository. However, I have recently try to build AOSP source tree and it somehow uses this module to generate "make-hash-tools.pl"

The Mavericks has perl version of 5.16.2, and its predecessor Mountain Lion has a 5.12.4. Is there a way to downgrade my Perl?

Compilation error looks like this:

  Can't locate Switch.pm in @INC (@INC contains: /Library/Perl/5.16/darwin-thread-\ 
  multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level\
  /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2\
  /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16\
  /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level \
  /System/Library/Perl/Extras/5.16 .) at external/webkit/Source/WebCore\
  /make-hash-tools.pl line 23.

Thanks~!


Solution

  • looks like running sudo cpanm Switch --force worked for me