Test::CallCounter - Count the number of method calling
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);
Test::CallCounter counts the number of method calling.
- my $counter = Test::CallCounter->new($class_name, $method_name)
Make a instance of Test::CallCounter and hook
$class_nameto count calling method.
Get a calling count of
Tokuhiro Matsuno <firstname.lastname@example.org>
If you want to do more complex operation while monkey patching, see also Test::Resub.
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.