From a7ae0f848fbe22ebda3afe430ccf8c045f05e989 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 f2d8ae7..6451c08 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