in reply to Campaign to clean up CPAN modules' POD?

Dear God no. Trying to advocate your coding standards in other people's code is silly enough; doing so in their documentation is somewhere between useless and counterproductive.

Please keep the can shut. There's no need to run around trying to stamp out thought-crime.

  • Comment on Re: Campaign to clean up CPAN modules' POD?

Replies are listed 'Best First'.
Re^2: Campaign to clean up CPAN modules' POD?
by cLive ;-) (Prior) on May 21, 2007 at 20:21 UTC

    Which is why I would keep it to just:

    • use strict
    • use warnings (or -w)
    • lexically scope variables

    None of those are particularly controversial. I'm not arguing about "cuddled elses", "$$ v. $->" dereferencing etc... tempting though it is :)

    I just hate walking in on someone's code where they've pretty much copied the example verbatim and not thought about tidying it up. I'd rather hit such code with strict and warnings in place if it's something I now have to deal with.

      I just hate walking in on someone's code where they've pretty much copied the example verbatim and not thought about tidying it up.

      If they haven't thought there, they didn't think elsewhere either. Verbatim copies of pod examples are a easy to find red flag. You wouldn't improve their overall code quality had you examples for every one of their needs in any pod ...

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

        Totally, but if they are running under strict and warnings with lexically scoped variables, I actually have a snowball in hell's chance of understanding the structure of the code and refactoring as needed. I don't need to know whether they understand all the benefits - it's just that they will have already done the basic work of catching that variable typo etc before I hit it :)

        That's a lot easier than trying to add "use strict" to a few thousand lines of code that have never run under strict before!

    A reply falls below the community's threshold of quality. You may see it by logging in.