can_ok()

A test for $obj->can($some_method)

ok( $obj->can('foo'),   'foo() method inherited' );

Simple but useful test can be like:

# Does the Foo class have these methods?
can_ok( 'Foo', qw(this that whatever wibble) );

Takes an object or a class.

Also useful for checking your functions are exported

use Text::Soundex;
can_ok(__PACKAGE__, 'soundex', 'soundex() exported');

| toc |