in reply to Climbing Mt. Perlcritic -- Switch statements
Apart from that, I would strongly advise against modifying code logic just to get a few points of improvement on someone else's idea of a "complexity/simplicity" score. (And as others have said, I would avoid using the switch module.)
You only should modify your coding logic or syntax if it's doing something wrong or if, when you try to read it, you find yourself struggling to understand what it's really doing (and/or what it's supposed to be doing). But if you can read it and it makes sense -- and if it works as intended -- it ain't broke, so don't "fix" it.
(updated first and last paragraphs to try making them clearer)
|
|---|