MooseX...::Class(3pm)

πŸ“¦
version 0.27 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– MooseX::NonMoose::Meta::Role::Class πŸ’–

okay so bestie, welcome to the manual page for MooseX::NonMoose::Meta::Role::Class β€” that's the one sitting in the User Contributed Perl Documentation section of the manual, filed under section 3pm. yeah the header got truncated all cute-like to MooseX...::Class(3pm), but you and me both know the real name now. slay.


✨ NAME ✨

MooseX::NonMoose::Meta::Role::Class β€” it's a metaclass trait for MooseX::NonMoose. that's it, that's the whole name situation. πŸ’…


🌸 VERSION 🌸

version 0.27. she's got a number, she's official, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's how you actually use her. option one, the quick lil one-liner vibe:

package Foo;
use Moose -traits => 'MooseX::NonMoose::Meta::Role::Class';

or, if you're feeling ✨extra✨ and wanna wire it up by hand:

package My::Moose;
use Moose ();
use Moose::Exporter;

Moose::Exporter->setup_import_methods;
sub init_meta {
    shift;
    my %options = @_;
    Moose->init_meta(%options);
    Moose::Util::MetaRole::apply_metaclass_roles(
        for_class       => $options{for_class},
        metaclass_roles => ['MooseX::NonMoose::Meta::Role::Class'],
    );
    return Moose::Util::find_meta($options{for_class});
}

like, both work. pick your fighter. 🫢


πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea, bestie. this trait handles everything that's involved with extending non-Moose classes β€” all of it, every last bit β€” except for the actual inlining that happens at make_immutable time. that part is not her job. she does not do that. don't ask her to.

want the full lore? go read MooseX::NonMoose, that's where the details live. iykyk. πŸ“–βœ¨


πŸ’œ AUTHOR πŸ’œ

  • Original author: Jesse Luehrs <doy@tozt.net> πŸŽ€
  • Current maintainer: Graham Ollis <plicease@cpan.org> 🌟

look at them, carrying this whole thing on their backs. iconic behavior honestly. πŸ‘‘


This software is copyright (c) 2009-2025 by Jesse Luehrs.

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 go wild, bestie. πŸ¦‹


and that's a wrap on the whole page, fr fr πŸ’–

perl v5.40.0 Β· 2025-01-11 Β· MooseX...::Class(3pm) β€” that's the version, the date, and the name this page rolls with at the bottom. mwah. πŸ’…πŸŒΈ

πŸ“¦ where this page comes from