Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Care to share a few implementations? I'd be particularly interested in running the test file and filtering out all successes. (If that means writing to Test::Harness::Straps, so be it.)

    • They use custom test modules they wrote a while ago, so much of their implementation is based upon knowledge of their test modules and how they're structured. I haven't thought of a more generic way of doing it.

      Unless I misunderstand you, perhaps a naive implementation in your .vimrc would be map ,t !eval "./%" | grep "^not"?

      That will make the "not ok" show up and the error data is written to STDERR, so that also would not be filtered.
    • Run the same using tv -q from Test::Verbose.
  • I'd be very interested in seeing some more of these useful vim mappings. I've been digging vim ever since I started playing with Red Hat back in Jan 2002, (and have gone so far as to install a Mac OS Classic version of vim on my PPC 7600 running OS 8.6)

    I've gotten a lot of vim knowledge thanks to MetaCosm's IRC-style tutorial [vi-improved.com] (which seems to be down at the moment but you can find it cached on google), and the #vim channel on irc.freenode.net, but fresh input from people that know some serious vim-fu woul

  • You don't even need the eval. I have two mappings for doing something with the current file:


          map ü :!perl -w %
          map ö :!perl -wc %


    So 'ö' will syntax-check the current file (I hope the German umlauts will be visible to non-Germans as well). The disadvantage of that, I just realize, is that mine has the interpreter to use hardwired in and wont respect the she-bang line.

    But indeed, vim is pretty amazing even though I am myself only scratching on
    •     :!./%
      is even more simple. That's what I use ;-) although
          :new|r!./#
      is also useful. (Quote the pipe with \ in maps.)

      My favorite vim map is amazingly simple :
          vmap * y:let@/=@"<CR>n
      Select a word or part of a word in visual mode, enter '*', and voilà, you're searching for this word.
      • :!./%
        Windows doesn't seem to like that, but specifying 'perl %' as the command does work. Either way, I really need to learn some vim; I'm still using it like it's plain vi.