From 5f6e19e26dca087fe22203d4d4eeddaf372945af Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 3 Jul 2012 21:35:49 -0400 Subject: [PATCH] Remove redundant code, increase readability --- modules/perl/init.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/perl/init.zsh b/modules/perl/init.zsh index c833bd8..39c9bed 100644 --- a/modules/perl/init.zsh +++ b/modules/perl/init.zsh @@ -9,15 +9,17 @@ if [[ "$OSTYPE" == darwin* ]]; then # Perl is slow; cache its output. cache_file="${0:h}/cache.zsh" perl_path="$HOME/Library/Perl/5.12" + if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then manpath=("$perl_path/man" $manpath) + if [[ ! -s "$cache_file" ]]; then perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file" - source "$cache_file" - else - source "$cache_file" fi + + source "$cache_file" fi + unset perl_path unset cache_file