There is no shortage of mocking tools on cpan. Most make you want to claw your eyes out.
A while back Mock::Quick came in, and provided a much cleaner API for mocking, but it too had limitations.
The mocking components provided by Test2 (Specifically Test2::Mock) build off the design of Mock::Quick, but fix several shortcomings.
mock() | Universal mocking interface | |
mocked() | Check if something is mocked | |
mock_class() | Explicit class mocking | |
mock_obj() | Explicit object mocking |