|
NAMEMock::Sub::Child - Provides for Mock::Sub METHODSPlease refer to the "Mock::Sub" parent module for full documentation. The descriptions here are just a briefing. newThis method can only be called by the parent "Mock::Sub" module. calledReturns bool whether the mocked sub has been called yet. called_countReturns an integer representing the number of times the mocked sub has been called. called_withReturns a list of arguments the mocked sub was called with. mockThis method should only be called by the parent mock object. You shouldn't be calling this. remockRe-mocks an unmocked sub back to the same subroutine it was originally mocked with. mocked_stateReturns bool whether the sub the object represents is currently mocked or not. nameReturns the name of the sub this object is mocking. return_valueSend in any values (list or scalar) that you want the mocked sub to return when called. side_effectSend in a code reference with any actions you want the mocked sub to perform after it's been called. resetResets all state of the object back to default (does not unmock the sub). unmockRestores original functionality of the mocked sub, and calls reset() on the object.
|