Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
No such thing as a small change
 
PerlMonks  

Re^2: Module Announcement: Perl-Critic-1.01

by jthalhammer (Friar)
on Jan 26, 2007 at 13:34 UTC ( #596708=note: print w/ replies, xml ) Need Help??


in reply to Re: Module Announcement: Perl-Critic-1.01
in thread Module Announcement: Perl-Critic-1.01

How odd. It appears that the report you got was created on Jan 19 and pertains to some other file that was previously uploaded. Somehow, the web-service dished up the wrong analysis. I'll have to dig into it. Thanks for exposing that!

When I analyze your code with 'perlcritic' directly, the results seem much more sensible, and a lot less noisy.

-Jeff


Comment on Re^2: Module Announcement: Perl-Critic-1.01
Re^3: Module Announcement: Perl-Critic-1.01
by BrowserUk (Pope) on Jan 26, 2007 at 23:43 UTC

    I just tried again, and got

    I knew I wouldn't like it, but I at least expected to have to justify my arguments. But this?

    This is just another example of the PC madness, like http://news.bbc.co.uk/1/hi/england/north_yorkshire/6296637.stm and many, many other examples that is gripping our world and turning it into a mirthless, freedomless place of bland, grey uniformity.

    Thanks theDamian. You've gone from being the wild child of Perl, envied and awed by the many; to being the pillar of salt that the PHBs will forever use to enforce mediocrity, uniformity and the lowest common denominator upon the once hip and innovative and freedom loving world of Perl. Like the reformed smoker, or the born again religious, when you converted, you made sure that the PHBs will enforce your will upon the rest of us too.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Dead on the mark, BrowserUk, and the link you provided is very appropriate:
      "I must admit the lady wasn't too persistent and I realised she was only doing what she's been told to do."

      A Morrisons spokesman said: "This is done with the best of intentions and we would hope it is taken in good humour by those obviously over the age of 21, as we do not wish to cause offence and no disrespect is intended.

      "We take our responsibility with regard to selling alcohol very seriously and all our stores operate the Task 21 scheme, which addresses the difficulties staff face in being able to determine if a customer is legally old enough to buy alcohol.

      "To further limit any element of doubt, staff at the Acomb store are required to ask anyone buying alcohol to confirm that they are over 21."

      Continue to force people to do things contrary to their understanding of what is best in a given context, only because there are rules that say so, and you end up with them not being able to trust their inner guidance any more.

      Perl is so much about context and expression, which comes along with ambiguities, that rule enforcing ultimately leads you to fighting your tool.

      If by some odd chance I have to live under the sway of Perl::Critic (or PBP, for that matter), I'll continue to say mkdir $dir, 0755 and not convert the flags to decimal, and I'll say opendir (D, $dir) or die "foo: $!\n" despite grouping parens for builtins being deprecated, because that way I can work best, fast, and I can read my code. Any other perler also can; the aforementioned expressions will only seem wrong to those which know PBP and don't know TIMTOWDI.

      I'll continue to use perl "to get your job done, before your boss fires you" (which you sometimes is me, sometimes is you). I guess I will have gob enough to argue with any PHB, and the code fixing a la Damian will be paid for, as well...

      --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}

        FYI, a starting point for an appropriate ~/.perlcriticrc for you (based on the above) might look like:

        [-CodeLayout::ProhibitParensWithBuiltins] [-ValuesAndExpressions::ProhibitLeadingZeros] [-InputOutput::ProhibitTwoArgOpen] #if applicable to opendir

        I wouldn't disparage the tool because it recommends things you don't agree with. I think even TheDamian suggests that not everyone will agree with every "Best Practice", as any thread concerning PBP here will clearly show. However, enough can not be said for something that helps a team of developers write all code in a consistent manner, a manner that tends toward readability, maintainability, and as few bugs due to misunderstandings as possible.

        For posterity, my ~/.perlcriticrc file looks like this:

        [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] [-Miscellanea::RequireRcsKeywords] [-Modules::RequireVersionVar] [ControlStructures::ProhibitPostfixControls] allow = if severity = 1

        Keep in mind that Perl::Critic is highly configurable, and will only alert you to "issues" at its current reporting level - which is quite low (when using the command line tool without any options).



        --chargrill
        s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-04-19 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls