---
name: "Mock::Sub::Child"
section: "3pm"
platform: "linux"
package: "libmock-sub-perl"
version: "1.09-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Mock::Sub::Child"
---

# Mock::Sub::Child(3pm)

Provides for Mock::Sub

## 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.
