Perl Testing Modules
Discover how to use critical Perl testing modules such as Test::More, Test::Fatal, and Test::Class to write reliable tests and increase code quality. Learn to mock objects, test exceptions, analyze coverage, and organize test suites for better maintainability.
We'll cover the following...
We'll cover the following...
Testing modules
Test::More relies on a testing backend known as Test::Builder, which manages the test plan and coordinates the test output into TAP. This design allows multiple test modules to share the same Test::Builder backend. Consequently, the CPAN has hundreds of test modules available—and they can all work together in the same program:
Test::Fatal: This helps test whether our code throws (and does not throw) ...