Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Defining a sub within a sub: OK?

by Khen1950fx (Canon)
on Oct 14, 2009 at 22:50 UTC ( [id://801233]=note: print w/replies, xml ) Need Help??


in reply to Defining a sub within a sub: OK?

I tried running your script using:

perlcritic --harsh --statistics script.pl

The results were, well, more than I thought that I would get:

1 files. 1 subroutines/methods. 8 statements. 14 lines, consisting of: 2 blank lines. 1 comment lines. 0 data lines. 11 lines of Perl code. 0 lines of POD. Average McCabe score of subroutines was 1.00. 17 violations. Violations per file was 17.000. Violations per statement was 2.125. Violations per line of code was 1.214. 6 severity 4 violations. 6 severity 2 violations. 5 severity 1 violations. 5 violations of CodeLayout::RequireConsistentNewlines. 1 violations of CodeLayout::RequireTidyCode. 1 violations of Compatibility::PerlMinimumVersionAndWhy. 1 violations of Editor::RequireEmacsFileVariables. 3 violations of InputOutput::RequireCheckedSyscalls. 3 violations of Miscellanea::RequireRcsKeywords. 1 violations of Modules::RequirePerlVersion. 1 violations of Modules::RequireVersionVar. 1 violations of Subroutines::RequireFinalReturn.

Replies are listed 'Best First'.
Re^2: Defining a sub within a sub: OK?
by BrowserUk (Patriarch) on Oct 15, 2009 at 00:43 UTC
    1 violations of Editor::RequireEmacsFileVariables.

    Oh My God!!!!!!!!!!

    Every perl script I ever wrote contains at least 1 violations". even if it is totally empty! Woe is me.

    Actually, without bothering to look up the other violations being commited above, I'm guessing half a dozen others would also be triggered by an empty, or all whitespace source file.

    What's next? Will I be penalised because Blond highlights with a hint of purple are just "so 2007"?

    I'm really hoping that you thought that the above was worth posting on the basis of an ironic critique of the critic.


    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.
      ++! I was thinking of something more gothic---black with a hint of neon green:-).

        In truth, I'm more non-descript brown with a smattering of grey, but Google failed to turn up a plaintiff cry from anyone similarly afflicted.

        a hint of neon green

        Neon is '90s; '80s are in the ascendant. Try chartreuse .


        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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-19 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found