in reply to Re^3: How to redefine a modules private function?
in thread How to redefine a modules private function?
I assume you're not advocating for magic numbers - I might have said that a constant that isn't modifiable from outside the module is a problem.
I agree. I meant "don't use constants, make it variables that can be changed from the outside".
That said, i'm a lazy bum and i use some magic numbers in code i write.
In my personal opinion, the worst offender in the whole Perl ecosystem when it comes to "magic numbers" is the default variable $_. It has no fixed value, and the perl interpreter pops it silently into your code whenever you forget to specify a variable.
|
---|