Better Comparison and Organization of Tests

Better comparisons

Even though the heart of all automated testing is the boolean condition “is this true or false?” reducing everything to that boolean condition is tedious and produces awkward diagnostics. Test::More provides several other convenient assertion functions.

The is() function

The is() function compares two values using Perl’s eq operator. If the values are equal, the test passes:

Get hands-on with 1200+ tech skills courses.