good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Backdating strictby eyepopslikeamosquito (Archbishop) |
on Nov 18, 2020 at 23:45 UTC ( [id://11123801]=note: print w/replies, xml ) | Need Help?? |
You may well be right - and I see the redoubtable LanX agrees. It depends though on how the original code was written, especially with regard to variable scope. If the original code follows the four simple rules in the Encapsulation section at On Coding Standards and Code Reviews, namely:
To prove my point, I remember once coming back to a large module I'd originally written, only to fall off my chair when I noticed some clown had commented out the use strict line at the top of the file! Without a comment to explain why. BTW, On Commenting Out 'use strict;' shows I'm not alone in being scarred for life by this unpleasant experience. Anyways, after picking myself up off the floor, I was pleasantly surprised to quickly repair this unfortunate act of code vandalism by restoring the use strict line and making only minor adjustments to the code. Admittedly, having the bulk of the code already strict-safe and having a unit test for the module certainly helped.
In Section
Seekers of Perl Wisdom
|
|