Permalink
Browse files

metacpan command that open the module's detail on metacpan.org

  • Loading branch information...
1 parent fb90dba commit 632e5d3c97a638186fd3ad2abe21a15f222c9243 @aereal committed Apr 9, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 bin/metacpan
View
@@ -0,0 +1,16 @@
+#!/usr/bin/env zsh
+
+open_command=''
+open_args=''
+
+if /usr/bin/which -s open; then
+ open_command='open'
+ open_args=''
+fi
+
+if [[ ! -x =$open_command ]]; then
+ echo "open-able command is not found." > /dev/stderr
+ exit 1
+fi
+
+$open_command $open_args "http://metacpan.org/module/$1"

0 comments on commit 632e5d3

Please sign in to comment.