That is a good sign – I would run with brutal at least once and see what it 
throws up

We tend to ignore a couple of the warnings – one is postfix if/unless and the 
other is multiline strings {we embed a lot of simple HTML templates in code and 
it means I can make the HTML readable when rendered rather than being one long 
string, plus SQL queries are more readable and heredocs are messy if you want 
to do concatenation or lots of printf/sprintf calls}

We have it as part of our svn commit pre-hooks so that people can’t push **** 
code to our repos and break things {one of the reasons we haven’t moved to git! 
as hooks are a bit messier… and people may not have the right software on the 
machines they have their repos on}



From: Steven Haigh <net...@crc.id.au>
Sent: 08 February 2021 09:54
To: modperl@perl.apache.org
Subject: RE: Moving ExecCGI to mod_perl - performance and custom'modules'[EXT]

On Mon, Feb 8, 2021 at 09:13, James Smith 
<j...@sanger.ac.uk<mailto:j...@sanger.ac.uk>> wrote:

Use perl-critic this will find most of the nasties that you have the classic is:

Thanks for the tip! I have no idea how long I've been writing stuff in perl - 
and I never knew of this!

I ran it with the -3 option - which I figure is a good middle ground...

The good news, I just ran it over a lot of my code and it seems the only real 
things it picks up are not having a /x on the end of regex matches, using hard 
tabs, and multiline strings. I'd say that's a good sign.

It did pick up a couple of open statements that I didn't have a close for 
(*slaps wrist*), but I haven't seen much in the way of what looks to be major 
issues.

I was trying to find the PBP references - and was amazed that the Perl Best 
Practices *ebook* s $56.20 AUD hahahah

Amazon has a few copies listed second hand, with 3 weeks shipping.... The joys 
of being on an island a long way from anything ;)

--
Steven Haigh 📧 net...@crc.id.au<mailto:net...@crc.id.au> 💻 
https://www.crc.id.au 
[crc.id.au]<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.crc.id.au_&d=DwMFaQ&c=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo&r=oH2yp0ge1ecj4oDX0XM7vQ&m=e5xV9ANT9Dnmf1ept9VmObBssOhOe3Cci6goE99x62c&s=bK6vilo7Ud3M2_JhyA9RucR6k68i7T0pLK49RbBQbjY&e=>



-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE.

Reply via email to