If you have experience in other object-oriented languages, you may have used unit testing to develop your test cases and test suites. Object-oriented unit testingframeworks are more popular with programming languages such as C# and Java, while the majority of Perl tests are procedural. This isn't to say that one style is better than the other ”the choice between styles depends on the goal and structure of your software.
Test::Class is a powerful testing library that allows you to design your tests in the xUnit style. Tests using Test::Class are classes, not just simple test files. This is more complicated to start, but it allows you to organize test cases more easily as well as minimize repetitive testing code, especially for heavily object-oriented projects.
This chapter demonstrates how to write unit testing code in Perl with Test::Class to take advantage of its benefits, including fixtures and inheritance.