Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday December 07, 2004
12:44 PM

Making testing life easier in vim

[ #22191 ]

Now that I've returned to a "normal" development environment, I've found that I miss many of the tools that were available in my previous place of employment. Three of the most useful are represented by the following vim mappings.

map ,t :!prove -lv %<CR>
map ,T :!prove -lv % \| less<CR>
map ,d :!perl -d -Ilib/ %<CR>

I think, perhaps, I should start a project to build custom vim tools to make standard Perl testing easier. I miss many of the things I had, but we had a vary standardized development environment. Right now, my tools work only because I ensure that I fire up vim from the proper directory. That's an awful limitation.

I particularly miss the tool that allowed us to be dumped directly into the debugger at a given test. Maybe Test::Harness should offer support for this which prove can exploit? (Though I'm not sure if Test::Harness is the best place for this.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I'm stretching my vim wings lately trying to learn a bit more, and could definitely always use things that make working with Perl easier. If there's any way I could get a 'hey' if you need some help testing, or otherwise twisting and bending these vimish ideas, let me know. Be glad to try and help.

    Just don't expect rapid turnarounds, not much of my time is my own in the current present. :)
  • map ,d :!perl -d -Ilib/ %<CR>

    Pardon the lengthy introduction, but I hope the context will be of use.... At work, when I start working with a checkout, I do

    ww vod_foobarbaz_120987_WORK

    The ww means 'work with' (the directory name is subsystem, ticket description, ticket number, and ticket status... so I can spot my trees in QA status easily).

    ww is responsible for setting $ENV{CVSWORK} and replacing a few standard symlinks. This lets me refer to sections of the checkout in a standard way regardless