Description
Perl tests can create mocks that are automatically restored when a guard object leaves scope. This helps tests replace behavior temporarily without leaving global state changed for later cases.
It is a developer testing library. Mocked behavior should stay narrow so tests still exercise real integration points where they matter.