The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::CallCounter - Count the number of method calling

SYNOPSIS

use Test::CallCounter;

my $counter = Test::CallCounter->new(
    'LWP::UserAgent' => 'get'
);

my $ua = LWP::UserAgent->new();
$ua->get('http://d.hatena.ne.jp/');

is($counter->count(), 1);

DESCRIPTION

Test::CallCounter counts the number of method calling.

METHODS

AUTHOR

Tokuhiro Matsuno tokuhirom@gmail.com

SEE ALSO

Test::Mock::Guard

If you want to do more complex operation while monkey patching, see also Test::Resub.

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.