in reply to Re^3: perlcritic compliant way to eval?
in thread perlcritic compliant way to eval?

A tad harsh and I dare say true only in the extreme circumstances. The Critic is just a tool and even the most blunt force tool requires skill to use properly. It doesn't require you to do anything. The Critic **should** cause you to think before making changes, either to conform or defy. But, as you point out, blind obedience is not useful.

In that sense, my question was poorly formed. Having made the decision to use eval in this version of the code, I was really looking for any other low impact suggestions I could make use of that would minimize risk and maintenance, making the rather grand assumption the Critic would agree.

Given more time, I would almost certainly take out the eval and use some other form of data store for all this, I just happen to be moving on before I'll get that chance.

Regardless, thanks for the response and opinion. We all need a good jab in the brain every so often to keep us on track.

  • Comment on Re^4: perlcritic compliant way to eval?

Replies are listed 'Best First'.
Re^5: perlcritic compliant way to eval?
by BrowserUk (Patriarch) on Jul 21, 2016 at 14:03 UTC
    The Critic is just a tool and even the most blunt force tool requires skill to use properly.

    The problem is quite simple. Anyone who has the skills required to use Critic properly; doesn't need it. (That's not to say that it couldn't save them some time.)

    But in the absence of those skills; it becomes the defacto expert; both reference and arbiter.

    Whilst the ability to misuse it is not the responsibility of the authors; the default configuration is.

    By their choice of that default configuration they've produced a gun with a hair trigger and no safety; a car with 500bhp and drum brakes; a plane that can pull 9G that breaks up at 7G.

    Unfortunately, those extreme circumstances are simply: a lack of perl expertise. And that gets more common by the day. In part, because of the existence of tools like the critic.

    Why pay to employ someone from the ever diminishing pool of Perl expertise; when you can download the critic and machine-apply rote as a substitute to get the tick in the "code review" check box.

    Job done. Job gone.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.

      well hopefully, I fall into your category of "doesn't need it but using it to save time." However, your warning of fully understanding the defaults is well heeded and falls within my own statement about knowing the tools you use.

      FWIW, the same could be said about any Best Practices book, and most certainly any "Cookbook".