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

Re^2: Perl::Critic policy for common Log::Log4perl mistake

by andreas1234567 (Vicar)
on Nov 08, 2011 at 13:35 UTC ( #936783=note: print w/replies, xml ) Need Help??


in reply to Re: Perl::Critic policy for common Log::Log4perl mistake
in thread Perl::Critic policy for common Log::Log4perl mistake

Perl::Critic is a static code analyzer and can of course, by definition, not know the runtime length of arrays.

The intention is to create Perl::Critic policy to help track down all logging calls, and then based on the output, help identify which ones are likely to have a negative impact on performance.

--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
  • Comment on Re^2: Perl::Critic policy for common Log::Log4perl mistake

Replies are listed 'Best First'.
Re^3: Perl::Critic policy for common Log::Log4perl mistake
by jethro (Monsignor) on Nov 08, 2011 at 18:21 UTC

    I first wanted to reply that this would be nonsense because nobody puts big arrays into error logs (and I still stand by that). A perl_critic rule that produces 99% false positives is not a good perl_critic rule. But then it occured to me that debug-logs might have such calls more frequently.

    So you got a point, but only in so far as logging level 'debug' is concerned. You might flag all calls to debug that don't have such a if-clause and you actually would have a somewhat sensible rule IMO.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://936783]
help
Chatterbox?
[robby_dobby]: I was falling asleep at my chair and threw out that one bit about participating in a YAPC. Things went from there :-)
[erix]: never too late to pull legs
[LanX]: Official YAPC Africa 2013 Announcement
erix always game to pull legs from sleeping cells
[erix]: hm nice might do a spot of diving - Red Sea is said to be beautiful
[LanX]: well too many terrorist tourists
[erix]: I guess I can pass for a native
[LanX]: talking about destruction of diving spots
[LanX]: Nodes to consider
[erix]: oops - got to run, see you later

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2017-04-24 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.