## 0.185.3 — 2026-06-15

## What's Changed
* Fix/93 moo meta no moose by @geofffranks in https://github.com/geofffranks/test-mockmodule/pull/94


**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.185.2...0.185.3

## 0.185.2 — 2026-05-29

## What's Changed
* Fix/90 optional moose test deps by @geofffranks in https://github.com/geofffranks/test-mockmodule/pull/91


**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.185.1...0.185.2

## 0.185.1 — 2026-05-26

## What's Changed
* fix(GH #87): gate author-perlcritic.t behind AUTHOR_TESTING by @geofffranks in https://github.com/geofffranks/test-mockmodule/pull/88


**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.185.0...0.185.1

## 0.185.0 — 2026-05-07

## What's Changed
* Fix GH #83: Reverts to pre v0.181.0 behavior. new() returns singleton-per-package by default again. pass distinct => 1 for v0.181's fresh-object-per-call behavior.
* New: Test::MockModule->original_for($pkg, $sub) — call the original sub from inside a mock closure without capturing $mock.

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.184.0...0.185.0

## 0.184.0 — 2026-05-04

## What's Changed
* fix: restore noop() to return 1 for backward compatibility by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/80


**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.183.0...0.184.0

## 0.183.0 — 2026-05-01

## What's Changed
* Followup to PR #77 by @geofffranks in https://github.com/geofffranks/test-mockmodule/pull/79
* Thanks @Koan-Bot @atoomic for providing a fix for #48 !

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.181.0...0.183.0

## 0.182.0 — 2026-05-01

## What's Changed
* Provide a global way to assure nostrict ever happens by @toddr in https://github.com/geofffranks/test-mockmodule/pull/66
* Fix define() + unmock() bug, CI modernization, prototype tests by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/69
* feat: mocked_subs() introspection + original() fix (GH #52, #42) by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/70
* fix: align noop() return value with mock_all(noop=>1) by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/71
* fix: add strict mode guard to mock_all() by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/72
* ci: add Perl 5.40 and 5.42 to test matrix by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/75
* docs: fix POD typos and syntax errors by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/76
* perf: optimize _strict_mode() with exists check by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/73
* fix: skip special Perl subs in mock_all() by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/74

## New Contributors
* @Koan-Bot made their first contribution in https://github.com/geofffranks/test-mockmodule/pull/69

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.180.0...0.182.0

## 0.181.0 — 2026-04-30

## What's Changed
* Provide a global way to assure nostrict ever happens by @toddr in https://github.com/geofffranks/test-mockmodule/pull/66
* Fix define() + unmock() bug, CI modernization, prototype tests by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/69
* feat: mocked_subs() introspection + original() fix (GH #52, #42) by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/70
* fix: align noop() return value with mock_all(noop=>1) by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/71
* fix: add strict mode guard to mock_all() by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/72
* ci: add Perl 5.40 and 5.42 to test matrix by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/75
* docs: fix POD typos and syntax errors by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/76
* perf: optimize _strict_mode() with exists check by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/73
* fix: skip special Perl subs in mock_all() by @Koan-Bot in https://github.com/geofffranks/test-mockmodule/pull/74

## Moose & Mouse meta-class aware mocking (#55)

`Test::MockModule` now registers mocks on the target's Moose/Mouse meta-class via `add_method` (in addition to the symbol table) when the target uses `Class::MOP::Class` or `Mouse::Meta::Class`. This fixes:

- Role `requires` checks failing after mocking (incl. dynamic `apply_all_roles`).
- `The method 'foo' was not found in the inheritance hierarchy` errors when loading a subclass with `around foo` after mocking the parent's `foo`.

`unmock` restores via `add_method`, or `remove_method` (Moose) / internal cache purge (Mouse) for inherited originals.

Immutable classes fall back to symbol-table-only with a one-time warning. Moo is not supported (no MOP).

No public API change. Moose/Mouse/Class::MOP are not auto-loaded for non-Moose users.

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.181.0...0.182.0

## New Contributors
* @Koan-Bot made their first contribution in https://github.com/geofffranks/test-mockmodule/pull/69

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.180.0...0.181.0

## 0.180.0 — 2025-07-03

## What's Changed
* Remove Software::License from runtime dependencies by @bbrtj in https://github.com/geofffranks/test-mockmodule/pull/68

## New Contributors
* @bbrtj made their first contribution in https://github.com/geofffranks/test-mockmodule/pull/68

**Full Changelog**: https://github.com/geofffranks/test-mockmodule/compare/0.179.0...0.180.0

# NOTE: Automated tracking resumed 2026-05-04. See https://github.com/geofffranks/test-mockmodule/releases for any older entries pre-0.180.0.

# Revision history for Test::MockModule pre Aug 29, 2024

v0.179.0
- 82881df - Bump Module::Build requirement by @atoomic in #65

v0.178.0
- 6724a30 - Simplify CI workflow - Nicolas R
- 1801372 - Multiple improvements -  Nicolas R
- e97e316 - Add protection to _replace_sub - Nicolas R

v0.177.0
- 35f0d0b Update changelog - Geoff Franks
- 1d5b485 Move test modules from build to test requires - Olaf Alders
- 78afe10 Clean up changelog - Geoff Franks

v0.277.0

- Move test modules from build to test requires - Olaf Alders

v0.176.0
- 3ba8bc7 lexically scoped strictness - David Cantrell
- e57fc5a Update ci with dockerhub auth - Geoff Franks
- bfe1e63 Update GitHub workflow with deprecated add-path - Nicolas R

v0.175.0
- 964aa2a Ignore CI files and whitesource - Nicolas R

v0.174.0
- cf65e7c Fix typo in pod - nima

v0.173.0
- 4dacd82 Add warning when 'unmock' called without arguments - Matthew Hughes
- b20dc7c import warns when using unknown argument - Nicolas R
- 3b217ba Fix windows CI by installing SUPER - Nicolas R
- 0ef70c5 Add .whitesource configuration file - whitesource-bolt-for-github[bot]

v0.172.0
- 7558aa9 Make sure we can redefine a function in 'main' - Nicolas R
- 0538fe1 Plug GitHub workflow as additional CI - Nicolas R
- 0e9d90b update parallel to use in_parallel instead ofaggregate - Geoff Franks

v0.171.0
- 89dc5c0 Fixes #25 - mocking core::global no longer fails trying to load the module - Geoff Franks
- 9bb081a update ci for fewer infinite loops - Geoff Franks
- 289d014 Update release notes for all the newly merged PRs - Geoff Franks
- fef9e74 Allow chaining of new with mock, redefine, define - Nicolas Rochelemagne
- e136131 Prevent redefine() from triggering DESTROY. - Felipe Gasper
- 311f6b4 Adjust Travis CI configuration to use travis-perl.github.io - Nicolas Rochelemagne
- 2bed3e2 Add strict mode to ban the use of noop and mock. - Todd Rinaldo
- 0298d8d Provide define method so the mock method is unneeded in tests. - Todd Rinaldo

v0.171.0
- allow chaining of new with mock, redefine, define
- redefine() no longer triggers errors if the object being mocked is not a hashref
- Adds a define() method for mocking new functions that do not exist. Throws an
  error if a function does exist.
- Adds `strict` mode to prevent usage of noop() and mock() functions, and force
  the usage of define/redefine if desired.:
  ```
  use Test::MockModule qw/strict/;
  ```
- Mocking CORE::GLOBAL no longer throws errors indicating CORE::GLOBAL should have
  been installed/loaded

v0.170.0
- 182d066 Fix versioning for semver conversion + PAUSE - Geoff Franks
- 4afeedf release v0.17.0 - CI Bot
- 9df8ac4 Add CI pipeline for releasing to cpan - Geoff Franks
- 577350e Pod - provide a code snippet for original usage - Nicolas R
- 3e4ec72 Add missing pod entries - Geoff Franks

v0.16
    - Fixes an issue where warnings were thrown for mismatched prototypes,
      when mocking a prototyped function.

      Thanks @toddr for the fix!

v0.15
    - Fixes a minor bug in the release tarball

v0.14
    - Fixes a bug where the `redefine()` function was dying when attempting to
      mock a function that was defined further up a module's inheritance chain.
      It now only dies when the mocked function does not exist in the module being
      mocked, or any of its parent modules. Thanks @atoomic for the improvement!

v0.13
    - Added the `redefine()` function. It works just like `mock()`, except if the
      method being mocked doesn't exist, it causes a panic. Many thanks to Felipe
      Gasper for this feature!

v0.12
    - Added the `noop()` function to make mocking noops easier. Thanks for the PR,
      Ali Zia!

v0.11 2016-10-27
    - Various housekeeping, testing and minor fixes, courtesy of Paul Cochrane, thanks!

v0.10 2015-05-30
    - Updated docs for mocking when using exported functions

v0.09 2015-03-15
    - Ensure LICENSE autogenerates for distribution, fixed license issues in Build.PL

v0.08 2015-03-14
    - Updated README with correct instructions now that we use Build.PL

v0.07 2015-03-14
    - Updated docs for more clarity when handling objects of mocked classes.

v0.06 2015-03-07
    - unmock() on inherited subroutines will dispatch to the parent module,
      rather than replace the local subroutine with the parent's subroutine
      from the time of mocking (RT77439)

v0.05 2004-03-24
    - unmock() accepts a list of subroutines to unmock. Thanks to David Wheeler
      for the suggestion and patch
    - Added t/pod_coverage.t

v0.04  2004-12-12
    - You can now mock a subroutine with a scalar value or a reference
      (install sub that returns the value). Thanks to Ovid for the suggestion.

v0.03  2004-12-05
    - Restores subs/methods that previously didn't exist (undefine them)

v0.02  2004-11-28
    - Fixed restoring inherited methods

v0.01  2004-11-28
    - Initial revision
