Class::...:Wrapped(3)
π NAME π
Class::MOP::Method::Wrapped β the Method Meta Object for methods that have before, after, and around modifiers π
(yes bestie, this is a Class::MOP::Method::Wrapped(3) situation, perl v5.42.0, we're in the User Contributed Perl Documentation, let's go β¨)
πΈ VERSION πΈ
version 2.4000 β she's grown, she's evolved, she's iconic π
π¦ DESCRIPTION π¦
okay so. this is a Class::MOP::Method subclass, right? and what she does is implement before, after, and around method modifiers. that's the whole vibe. that's the assignment and she ATE π
β¨ METHODS β¨
π Class::MOP::Method::Wrapped->wrap($metamethod, %options)
this is the constructor, bestie β the main character entrance π
she accepts a Class::MOP::Method object and a hash of options. and the options areβ¦ drumroll please π₯
nameβ the method name (no package name attached, we keep it simple β¨). if you don't pass it, she'll just yoink it from theClass::MOP::Methodobject you gave her.package_nameβ the package name for the method. same deal, if you don't provide it, it gets taken from thatClass::MOP::Methodobject you handed over.associated_metaclassβ an optionalClass::MOP::Classobject. this is the metaclass for the method's class. optional, so like, no pressure π
π $metamethod->get_original_method
this one returns the Class::MOP::Method object that you passed to the constructor. that's it. she's giving "no thoughts, just the original" and honestly? valid π«Ά
π $metamethod->add_before_modifier($code) / $metamethod->add_after_modifier($code) / $metamethod->add_around_modifier($code)
these three all do the same lil dance: they take a subroutine reference and apply it as a modifier to the original method. before, after, around β pick your fighter, they all slay π₯
π $metamethod->before_modifiers / $metamethod->after_modifiers / $metamethod->around_modifiers
and these three? they all return a list of subroutine references that are acting as the specified type of modifier. so you ask for the before ones, you get the before ones. you ask for the around ones, you get the around ones. iykyk β¨
π AUTHORS π
the legends themselves, no cap:
- Stevan Little
<stevan@cpan.org> - Dave Rolsky
<autarch@urth.org> - Jesse Luehrs
<doy@cpan.org> - Shawn M Moore
<sartak@cpan.org> - ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman)
<nothingmuch@woobling.org> - Karen Etheridge
<ether@cpan.org> - Florian Ragwitz
<rafl@debian.org> - Hans Dieter Pearcey
<hdp@cpan.org> - Chris Prather
<chris@prather.org> - Matt S Trout
<mstrout@cpan.org>
the way that there are TEN of them and every single one is a real one ππ
π§ COPYRIGHT AND LICENSE π§
This software is copyright (c) 2006 by Infinity Interactive, Inc. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in freedom, bestie ποΈ
okay that's the whole page, no notes, periodt π β¨
and that's a wrap (get it? Wrapped? π) β perl v5.42.0, dated 2025-07-25, filed under Class::...:Wrapped(3) in the User Contributed Perl Documentation. mwah π
π¦ where this page comes from
- fedora 43: perl-Moose 2.4000-4.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms