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

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.
  • 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 of which tree I'm working with or which subsystem (vod, hve, calendar, etc) I'm working with. No matter which tree/subsystem I'm using, the perl lib, web src, scripts, sql defs, and one time scripts are each always at a known static path.

    Then, I can use those paths in my .cvswork, my bash functions/aliases and (more significantly for this comment) in my vim mappings. If I do ,g1 I've typed the equivilant of
    :n /path/to/current_checkouts/subsystem_specific_perl_lib/
    If your checkouts have a consistent structure, then you could have something like ww which you call to start working with a tree. If you have one sort of tree for home and one for work, you could use two flavors of ww or one smart flavor. Then in your vimrc you could have something along the lines of
    map ,d :!perl -d -I~/ww/lib/ %<CR>
    regardless of where you started vim. Hmmm... Actually, I've got my vim set to consider the directory of the current buffer as its current dir, so no matter where I started vim up, I'd have trouble getting along without ww.

    This is also how I can have a bash alias preflight which automatically updates, tests, and spiders the correct subsystem of the current checkout. :)