Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: converting strings to ints

by Hue-Bond (Priest)
on Mar 20, 2010 at 16:35 UTC ( [id://829822]=note: print w/replies, xml ) Need Help??


in reply to Re: converting strings to ints
in thread converting strings to ints

If you know you are going to be trying to treat null strings as numbers, turn it off:

Then perlcritic will complain:

Warnings disabled at line 10, column 5.  See page 431 of PBP.  (Severity: 4)

Solution 1 (ugly): no warnings 'numeric';  ## no critic (TestingAndDebugging::ProhibitNoWarnings)

Solucion 2 (dangerous): add the following to ~/.perlcriticrc:

[TestingAndDebugging::ProhibitNoWarnings] allow = numeric

--
 David Serrano
 (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling error. Thank you!).

Replies are listed 'Best First'.
Re^3: converting strings to ints
by BrowserUk (Patriarch) on Mar 20, 2010 at 17:20 UTC
    Then perlcritic will complain:

    Quite frankly my dear, I don't give a damn! :)

    And if you're going to allow a piece of dumb software to override your own judgement, then I've got a link that will tell you your computer is riddled with virii and trojans and will only charge you $49.99 to rid you of them.

    As configured by default, it shouldn't be called perlcritic but perlblatentalarmist.


    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.
      As configured by default, it shouldn't be called perlcritic but perlblatentalarmist.

      Yes, I fully agree with that. Thankfully, it can be configured!

      --
       David Serrano
       (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling error. Thank you!).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-23 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found