Test::Builder implements the following methods.
new()
Returns a Test::Builder object representing the current state of the
test. There's no need to create more than one
Test::Builder object, since you run only one test per program.
BAILOUT(reason)
Terminates all tests and exits immediately.
expected_tests()
Gets and sets the tests that will run and prints out the correct
headers.
exported_to(package)
Specifies the package you exported your functions to.
is_eq(got_from_test, expected_from_test, name_of_test)
Checks if got_from_testeq expected_from_test.
isnt_eq(got_from_test, did_not_expect, name_of_test)
Checks if got_from_testne did_not_expect.
isnt_num(got_from_test, did_not_expect, name_of_test)
Checks if got_from_test!= did_not_expect.
is_num(got_from_test, expected_from_test, name_of_test)
Checks if got_from_test== expected_from_test.
like(string, '/regex/', name_of_test)
Checks if string matches the specified
regular expression.
no_plan()
Declares that there may be an infinite number of tests.
ok(test, name)
Reports if test by
name is true.
plan()
Sets up the tests for you, prints appropriate headers, and takes
appropriate actions. plan can be used in lieu of
any of the subsequent methods.
skip([reason])
Skips the current test, citing reason.
skip_all(reason)
Shamelessly skips all the tests, citing the given reason . Exits with 0.
my $reason = "I didn't feel like it today.";
$Test->skip_all($reason);
unlike(string, '/regex/', name_of_test)
Checks if string does not match the
specified regular expression.
 |  |  |
8.199. Test |  | 8.201. Test::Harness |