In the nature of test modules, all functions are exported by default.
The sub_track function creates a new call tracker for a named function.
The sub to track must be provided by name, references to the function
itself are insufficient.
Returns true if added, or dies on error.
sub_calls CW$subname, CW$expected_calls [, CW$message ]
The sub_calls function is the primary (and only) testing function
provided by Test::SubCalls. A single call will represent one test in
It takes the subroutine name as originally provided to sub_track,
the expected number of times the subroutine should have been called,
and an optional test message.
If no message is provided, a default message will be provided for you.
Test is ok if the number of times the sub has been called matches the
expected number, or not ok if not.
To prevent repeat users from having to take before and after counts when
they start testing from after zero, the sub_reset function has been
provided to reset a sub call counter to zero.
Returns true or dies if the sub name is invalid or not currently tracked.