NAME

Test::Mock::Signature::Dispatcher - method dispatcher class.

SYNOPSIS

You can add one more metadata to you dispatcher:

my $dispatcher = $mock->dispatcher('my_method_name');
$dispatcher->add($meta);

Or delete some meta:

$dispatcher->delete($meta);

Also you can compile your dispatcher meta information:

$dispatcher->compile;

DESCRIPTION

Provides a dispatching mechanism for main mock module Test::Mock::Signature.

METHODS

new($method_name)

Takes $method_name fully qualifed method name e.g.: Real::Module::method. Returns instance of the Test::Mock::Signature::Dispatcher class.

add($meta)

Takes object of the Test::Mock::Signature::Meta class and put it into dispatching list.

delete($meta)

Takes object of the Test::Mock::Signature::Meta class and remove it from dispatching list.

compile

Mocks the method in real class and put dispatching mechanism - on.

DESTROY

Removes mocked method and put back default behavior.

AUTHOR

cono <cono@cpan.org>

COPYRIGHT

Copyright 2014 - cono

LICENSE

Artistic v2.0

SEE ALSO

Test::Mock::Signature