From 8dcb1eaf0776148dd964e52e67c3e96047733552 Mon Sep 17 00:00:00 2001 From: Amory Meltzer Date: Tue, 2 Jun 2020 09:59:31 -0400 Subject: [PATCH] update: Use cpanm if available CPAN is fine and works but Lordy cpanm is just nicer --- bin/update | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/update b/bin/update index e4baf56d..3c4b6087 100755 --- a/bin/update +++ b/bin/update @@ -202,7 +202,12 @@ if [[ -z $cpan_all_flag ]]; then echo "$cpan_todo" if [[ -z $cpan_flag ]]; then updating 'CPAN modules' - cpan-outdated -p | xargs cpan -i + # Should probably just cut -f 1 -d ' ' + if [[ -f `command -v cpanm` ]]; then + cpan-outdated -p | cpanm + else + cpan-outdated -p | xargs cpan -i + fi cleaning 'CPAN directories' cpanclean; fi @@ -210,4 +215,3 @@ if [[ -z $cpan_all_flag ]]; then echo -e "${Color_Green}CPAN modules already up-to-date!${Color_zOff}" fi fi -