* "mock(*name*, *coderef*)" Adds a coderef to the object. This allows code to call the named method on the object. For example, this code: my $mock = Test::MockObject->new(); $mock->mock( 'fluorinate', sub { 'impurifying precious bodily fluids' } ); print $mock->fluorinate; will print a helpful warning message.