Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Test::More::ok and her ilk

by Athanasius (Bishop)
on Sep 17, 2018 at 03:53 UTC ( #1222491=note: print w/replies, xml ) Need Help??

in reply to Test::More::ok and her ilk

Hello rir,

Looking at the source code for just the ok method in Test::More, version 1.302140:

  1. sub ok (lines 317-22) returns the result of calling ok via Test::More->builder.

  2. Test::More->builder “Returns the Test::Builder object underlying Test::More” (line 1774). This is implemented in Test::Builder::Module: it simply returns Test::Builder->new (lines 171-3).

  3. The new method of Test::Builder returns a singleton Test::Builder object.

  4. So the underlying ok method invoked is Test::Builder->ok (lines 637-98) which explicitly converts its $test argument into a boolean value (line 644):
    sub ok { my( $self, $test, $name ) = @_; ... $test = $test ? 1 : 0; ... return $test; }

Clear? ;-)

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2020-09-29 14:15 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (146 votes). Check out past polls.