NAME
Mock::Sub::Child - Provides for Mock::Sub
METHODS
Please refer to the Mock::Sub
parent module for full documentation. The descriptions here are just a briefing.
new
This method can only be called by the parent Mock::Sub
module.
called
Returns bool whether the mocked sub has been called yet.
called_count
Returns an integer representing the number of times the mocked sub has been called.
called_with
Returns a list of arguments the mocked sub was called with.
mock
This method should only be called by the parent mock object. You shouldn't be calling this.
remock
Re-mocks an unmocked sub back to the same subroutine it was originally mocked with.
mocked_state
Returns bool whether the sub the object represents is currently mocked or not.
name
Returns the name of the sub this object is mocking.
return_value
Send in any values (list or scalar) that you want the mocked sub to return when called.
side_effect
Send in a code reference with any actions you want the mocked sub to perform after it's been called.
reset
Resets all state of the object back to default (does not unmock the sub).
unmock
Restores original functionality of the mocked sub, and calls reset()
on the object.