Class::MOP::Module(3)

πŸ’– Class::MOP::Module πŸ’–

okay bestie, welcome to the Class::MOP::Module page from the User Contributed Perl Documentation, aka the manual you landed on at 3am because your metaobject situation is giving chaos. sit down, hydrate, we're doing this together 🫢


✨ NAME ✨

Class::MOP::Module β€” Module Meta Object πŸ’…


🌸 VERSION 🌸

version 2.4000 β€” yes she has a version, yes she's proud of it ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So the way that a module works here is: a module is basically a Class::MOP::Package but with metadata. And in our case, that metadata is literally just the version and the authority. that's it. that's the whole vibe. lowkey elegant, ngl πŸ’œ


πŸŽ€ INHERITANCE πŸŽ€

Class::MOP::Module is a subclass of Class::MOP::Package. it's giving nepo baby but make it metaobject, and honestly? we love her for it πŸ‘‘


⭐ METHODS ⭐

πŸ’« Class::MOP::Module->create($package, %options) πŸ’«

She overrides create from Class::MOP::Package to hook you up with these additional options:

  • "version" β€” a version number, and it gets installed into the $VERSION package global variable. so like, the whole point 🌟
  • "authority" β€” an authority, and it gets installed into the $AUTHORITY package global variable.
🚨 okay important: authority is a legacy field and its use is not recommended. it's the old money of options. respect the history, don't use it, periodt πŸ’€

πŸ’« $metamodule->version πŸ’«

This is a read-only attribute, and it returns the $VERSION of the package β€” if one exists. if not? nothing, bestie. no version, no vibes πŸ™ˆ


πŸ’« $metamodule->authority πŸ’«

This is a read-only attribute which returns the $AUTHORITY of the package, if one exists. same energy as above, just the legacy one πŸŽ€


πŸ’« $metamodule->identifier πŸ’«

This constructs a string which combines the name, version and authority. it's the glow-up collage of all three fields at once, slay πŸ’…


πŸ’« Class::MOP::Module->meta πŸ’«

This will return a Class::MOP::Class instance for this class. meta about the meta. it's metas all the way down and honestly that's iconic 🌈


πŸ‘‘ AUTHORS πŸ‘‘

look at this friend group, they ate and left no crumbs:

  • 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>

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. so like, go off, remix it, just keep it free fr fr 🫢


and that's the page bestie!! this one came from perl v5.42.0 and was dated 2025-07-25, so shoutout to that exact snapshot of the Class::MOP::Module(3) manpage for making this whole yap possible πŸ’–βœ¨ go forth and metaobject responsibly πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from