function! Prove ( verbose, taint ) if ! exists("g:testfile") let g:testfile = "t/*.t" endif if g:testfile == "t/*.t" || g:testfile =~ "\.t$" let s:params = "l" if a:verbose let s:params = s:params . "v" endif if a:taint let s:params = s:params . "Tt" endif execute "!prove -" . s:params . " " . g:testfile else call Compile () endif endfunction function! Compile () if ! exists("g:compilefile") let g:compilefile = expand("%") endif execute "!perl -wc -Ilib " . g:compilefile endfunction nmap ,t :call Prove (0,0) nmap ,tt :call Prove (0,1) nmap ,T :call Prove (1,0) nmap ,TT :call Prove (1,1) nmap ,v :call Compile ()