Class::MOP::Method::Wrapped(3) User Contributed Perl Documentation Class::MOP::Method::Wrapped(3)

# [DESCRIPTION](#DESCRIPTION)

This is a Class::MOP::Method subclass which implements before, after, and around method modifiers.

# [METHODS](#METHODS)

## [Class::MOP::Method::Wrapped-&gt;wrap($metamethod, %options)](#Class::MOP::Method::Wrapped)

This is the constructor. It accepts a Class::MOP::Method object and a hash of options.

The options are:

- name
  
  The method name (without a package name). This will be taken from the provided Class::MOP::Method object if it is not provided.
- package\_name
  
  The package name for the method. This will be taken from the provided Class::MOP::Method object if it is not provided.
- associated\_metaclass
  
  An optional Class::MOP::Class object. This is the metaclass for the method's class.

## [$metamethod-&gt;get\_original\_method](#$metamethod)

This returns the Class::MOP::Method object that was passed to the constructor.

## [$metamethod-&gt;add\_before\_modifier($code)](#$metamethod~2)

## [$metamethod-&gt;add\_after\_modifier($code)](#$metamethod~3)

## [$metamethod-&gt;add\_around\_modifier($code)](#$metamethod~4)

These methods all take a subroutine reference and apply it as a modifier to the original method.

## [$metamethod-&gt;before\_modifiers](#$metamethod~5)

## [$metamethod-&gt;after\_modifiers](#$metamethod~6)

## [$metamethod-&gt;around\_modifiers](#$metamethod~7)

These methods all return a list of subroutine references which are acting as the specified type of modifier.

2026-10-01 perl v5.44.0

---

Document: Class::MOP::Method::Wrapped(3pm) from perl-moose 2.4001-r0 (Chainguard OS)
Source: https://github.com/moose/Moose
