From 4d42055b4b815ee2eabfd3db6035f65b5a8469a6 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 2 Feb 2019 14:13:36 +0000 Subject: use perldoc if no cpandoc --- .bash_profile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bash_profile b/.bash_profile index 86f21c0..c0a4f1b 100644 --- a/.bash_profile +++ b/.bash_profile @@ -25,7 +25,11 @@ function pd() { if [[ $1 == -b ]]; then firefox "https://metacpan.org/pod/$2" else - cpandoc "$@" + if type cpandoc &>/dev/null; then + cpandoc "$@" + else + perldoc "$@" + fi fi } -- cgit v1.2.3