3 # _perl_basepods - zsh completion function
5 # Adam Spiers <adam@spiers.net>
7 # Calculate all installed Perl base pods (perlfunc, perlfaq etc.).
8 # The result is cached for future use.
11 if (( ! $+_perl_basepods )); then
12 typeset -agU _perl_basepods
14 if (( ${+commands[basepods]} )); then
15 _perl_basepods=( ${$(basepods):t:r} )
19 podpath=$(perl -MConfig -e 'print "$Config{installprivlib}/pod"')
21 if [[ ! -e $podpath/perl.pod ]]; then
22 _message "can't find perl.pod from Config.pm; giving up"
25 _perl_basepods=( ${podpath}/*.pod(:r:t) )
32 _wanted pods expl 'perl base pod' compadd -a "$@" - _perl_basepods