in reply to Failed test of Net::SNTP::Client module

Instead of using ok(), I like to use is() or diag() from Test::More, because they always also output the offending values when a test failure occurs. That helps me to narrow down the causes of test failures.

Replies are listed 'Best First'.
Re^2: Failed test of Net::SNTP::Client module
by thanos1983 (Parson) on Jul 06, 2015 at 14:47 UTC

    Hello Corion,

    Thank you for your time and effort reading and replying to my question. You are absolutely right, I should use is() instead of ok().

    From documentation ( Test::More ):

    So why use these? They produce better diagnostics on failure. ok() cannot know what you are testing for (beyond the name), but is() and isnt() know what the test was and why it failed.

    Thanks for the tip.

    Seeking for Perl wisdom...on the process of learning...not there...yet!