XP is just a number | |
PerlMonks |
Re: Re: Re: Re: Weird Warningby Sifmole (Chaplain) |
on Jun 25, 2001 at 23:33 UTC ( [id://91398]=note: print w/replies, xml ) | Need Help?? |
I respectfully disagree...
Just because you "know" why, and don't feel like updating your conditionals, etc -- imagine 3 months or more down the line someone else has to support the code. They will not "know" the same thing you do. The more complete, easier to maintain method (IMO) is to update your conditionals... This code now makes it explicit to future maintainers that there is a possibility that the code could be querying non-existent data, and that this is an expected behavior (expected because the code supports it). I would personally rather see the conditionals, etc updated rather than seeing warnings being flipped on and off throughout the code. Plus, the questioner was obviously new to using hashes and was making a mistake with their use of them. So your answer to turn off the warnings would have resulted in the hiding of an error, the error that you "knew" was not there and "fully understood" the reason for.
In Section
Seekers of Perl Wisdom
|
|