background image
<< Test::More toys | isa_ok() >>
<< Test::More toys | isa_ok() >>
Next to is() and ok(), you'll be using like() the most.
like( $this, qr/that/ );
This is the same as:
ok( $this =~ /that/ );
It has nicer diagnostics:
not ok 1
# Failed test (contrived.t at line 2)
# 'wibble'
# doesn't match '(?-xism:woof)'
Because qr// was added in 5.005, it understands a string that
looks like a regex for older perls.
like( $this, '/that/' );