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.
  • Tab users like to tout that it allows you to use whatever indentation level you like when in reality you just wind up with mixed up tabs and spaces.

    I’ve been programming with tabs for indentation and spaces for alignment for the better part of a decade.

    I’ve never had a single problem keeping things straight in my own code.

    • I'm 100% with Schwern on this one. Tabs for indentation are just evil. Sure it works OK for you because you have your tools set up a certain way. But when you collaborate with others their tools will be set up differently and what they see will be different to what you see. For example I picked one of your CPAN modules at random and scrolled down looking for messed up indents. Sure enough in XML/Atom/ [] starting line 334 you have a group of lines that are indented with space rather than tabs. You can't see that because as Schwern says, tabs are invisible.

      The reason I could zero in on the example so quickly is I have this handy little setting in my vimrc:

      match Error /\t\|\s\+$/

      That causes trailing whitespace of any type and tab characters in any position to be displayed with a red background. Of course I also have a handy key mapping to turn that off when I'm working in a tab-infected project.

      • Figures. From looking at what part of the file it happened in, I know exactly what went wrong, too. Vim and me, we let each other down, there… :-(

        I’ve added set list to my .vimrc to ensure it won’t happen again.

        (The apparently-empty lines that this exercise revealed further down the file (in the POD section, l.427 ff.) bug me even more.)