Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: iterator w/ wantarray()

by stevieb (Canon)
on Apr 25, 2020 at 21:38 UTC ( [id://11116067]=note: print w/replies, xml ) Need Help??


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

I don't normally look for expected results in a comment at the bottom of the code. It should be expressed along with the problem statement.

Beyond that, I don't even look at code if the OP doesn't provide a problem statement, expected, and actual results up front. Why look at code to solve a problem for someone, if they don't at least state what's expected from it clearly? I might find 30 issues to fix, but I've wasted my time if I didn't fix the one thing that was broken to them.

Replies are listed 'Best First'.
Re^4: iterator w/ wantarray()
by jo37 (Deacon) on Apr 26, 2020 at 12:48 UTC

    Besides the phrase "in a comment", would your statement hold for an example written as a Test::More script, too?

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

      OP didn't post a question related to a Test::More script.

      Unit testing questions are different, and the way I approach them is determined by whether the poster is the author of the test and the software behind it, or is simply having an issue during an install of software they want to use, but likely doesn't have any idea how the internals or its tests work.

      I have gone on to supply patches to a good number of Open Source projects over the years because someone was having problems with unit tests of software they were simply trying to install and use, and I found bugs which I corrected.

        Probably my question was too vague.

        I believe that one of the most precise ways to describe a specific problem is by a Test::More script or something alike. The expected outcome will be at the bottom of the script in that case. The OP's example was not far away from such. Complaining about it appears to be more expensive than looking at this SSCCE.

        And this thread definitely is :-)

        Greetings,
        -jo

        $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11116067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2024-04-19 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found