in reply to Beware of global! And bless the local!

Indeed, I've made the same mistake myself. Note Perl::Critic has a policy for that :-)

Replies are listed 'Best First'.
Re^2: Beware of global! And bless the local!
by alexander_lunev (Pilgrim) on Dec 13, 2019 at 10:22 UTC

    Perl::Critic is a tool that I should adopt. On the one side there's laziness - oh, instead of just write this little thing I would spend it on this and that to make sure it's all right. But on the other side - there's so much ahead in this never-ending journey!

      Perl::Critic is a tool that I should adopt. On the one side there's laziness

      I find the --gentle and --stern settings useful to reveal excessive laziness, and the kind of cruft that accumulates during refactoring like stray whitespaces or the wrong type of quote chars. While --harsh --cruel and --brutal are useful as training wheels for advanced techniques, or enforcing code standards on hired guns, and as a form of pure pedantic entertainment for anyone who loves TIMTOWTDI.