It's a nifty little VIM script in that goes in .vimrc file:

"=====[ Run a Perl module's test suite ]========================= let g:PerlTests_program = 'perltests' " ...What to call let g:PerlTests_search_height = 5 " ...How far up to searc +h let g:PerlTests_test_dir = '/t' " ...Where to look for t +ests augroup Perl_Tests autocmd! autocmd BufEnter *.p[lm] nmap <buffer> ;t :call RunPerlTests()<CR +> autocmd BufEnter *.t nmap <buffer> ;t :call RunPerlTests()<CR +> augroup END function! RunPerlTests () " Start in the current directory... let dir = expand('%:h') " Walk up through parent directories, looking for a test directory +... for n in range(g:PerlTests_search_height) " When found... if isdirectory(dir . g:PerlTests_test_dir) " Go there... silent exec 'cd ' . dir " Run the tests... exec ':!' . g:PerlTests_program " Return to the previous directory... silent cd - return endif " Otherwise, keep looking up the directory tree... let dir = dir . '/..' endfor " If not found, report the failure... echohl WarningMsg echomsg "Couldn't find a suitable" g:PerlTests_test_dir '(tried' g +:PerlTests_search_height 'levels up)' echohl None endfunction

The VIM script makes use of a perltests script in ~/bin which finds the tests and executes them via TAP::Harness which itself can take a lib argument when creating a new object. So it seems like I should be able to put something in there to make this work. The beauty of it is I can do ;t keystroke and run tests.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks


In reply to Re^4: Running tests on modules generated by Module::Starter still in /lib directory by nysus
in thread Running tests on modules generated by Module::Starter still in /lib directory by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.