in reply to Re^7: iterator w/ wantarray()
in thread iterator w/ wantarray()

I normally stay out of directed comments, but there have been a couple back and forths where it looks (to me) like neither of you is seeing the meaning that I am seeing in both your posts; hopefully, my perspective will help bring understanding to one or both sides. If not, sorry for butting in or getting things completely wrong.

stevieb, my interpretation of what jo37 is trying to say is that putting the expected results in comments isn't that far removed from following the advice given in How to ask better questions using Test::More and sample data, where it is recommended that Seekers add Test::More tests to their SSCCE in order to make their expected results obvious. I believe, then, that jo37 was asking you whether you thought providing the expected data in the form of Test::More tests added just for the SSCCE was sufficient, or whether that would fall into your "I don't normally look for expected results ... at the bottom of the code" statement (with "in a comment" stripped out), especially since you "don't even look at code if the OP doesn't provide a problem statement, expected, and actual results up front"

I cannot answer for stevieb, but for my personal answer to jo37's query, I would say that any program that prints the expected vs actual results -- especially using a recommended framework like Test::More -- would be enough to convince me that the OP had put in enough effort to be worth my time to help with (assuming I thought I had any insight into the problem... which I usually don't). On the other hand, just putting the expected results in comments is different, IMO, because it puts the onus on me and fellow monks, as the potential helpers, to figure out what results the OP wanted, rather than making it obvious to the monks that expected results are really included.

My advice to the OP would be: Please make the expected results obvious to us: put it in a separate <code> block, or in the main <code> block after __END__, or using the advice in How to ask better questions using Test::More and sample data; or, at the very least, in your problem statement indicate "I have put the expected results in a comment just before the print statement of the actual results", because when it's just buried in the comments, how are we to know that it's in the comments without reading all the code first (when reading all the code and running it would be a waste of our time if we don't know what you expect the output to be).

edit: rereading the thread, I was reminded the original problem statement was somewhat lacking in details -- a description of what "perl hacks - hack-27" was would have been helpful (though I eventually found it through google: it's the Perl Hacks book by chromatic, ovid and TheDamian), along with more description, like "that book's hack-27 proported to get multiple outputs from an iterator in one call, but I don't seem to be getting the outputs that I would expect (see my comments near the print statement)". And yes, given the original problem statement, I probably wouldn't have tried to answer (even if I had a clue as to what was going wrong, which I didn't at the time).