Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Campaign to clean up CPAN modules' POD?

by cLive ;-) (Prior)
on May 21, 2007 at 20:21 UTC ( [id://616633]=note: print w/replies, xml ) Need Help??


in reply to Re: Campaign to clean up CPAN modules' POD?
in thread Campaign to clean up CPAN modules' POD?

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.

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

Replies are listed 'Best First'.
Re^3: Campaign to clean up CPAN modules' POD?
by shmem (Chancellor) on May 22, 2007 at 05:43 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://616633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-25 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found