"be consistent" | |
PerlMonks |
Re: RFC: Data::Syncby diotalevi (Canon) |
on Sep 22, 2005 at 14:46 UTC ( [id://494148]=note: print w/replies, xml ) | Need Help?? |
I skimmed your code and wanted to pick some nits with you. None are serious. The rest of your code was too sparse to skim and I couldn't read it. If you plan to be backwards compatible with 5.005, you do not use warnings and you use vars instead of our(). If you are going to be 5.6+, you may use both. Doing only one is strange and it looks like you don't understand the reasons for doing things one way or the other.
Your warning is technically correct but irrelevant. The order of keys() always matches the order of values(). Even in 5.8.x+ with key order randomization, this is true. This can be rewritten as two simple statements.
Instead of transforming a list of indexes into a list of "?" characters, its easier to just create that many "?" in one operation. Its faster and wastes less memory too. The parentheses are important. It means you get back a list of "?" instead of a string with many "????????" in it.
In Section
Meditations
|
|