ExtUti...::Enum(3pm)

✨ NAME ✨

ExtUtils::XSpp::Node::Enum β€” the node that's literally just an enum declaration, bestie πŸ’…


🌸 DESCRIPTION 🌸

Okay so picture this: ExtUtils::XSpp::Node::Enum is a subclass of ExtUtils::XSpp::Node and it represents an enum declaration. That's the whole vibe. πŸ‘‘

Like, say you've got this in your code:

enum Bool
{
    FALSE = 0,
    TRUE
};

That's gonna hand you back an ExtUtils::XSpp::Node::Enum object where the name is "Bool", and there are two ExtUtils::XSpp::Node::EnumValue values chilling in the arguments array. Two of them. Iconic. 🫢

Lowkey important heads-up: enumerations do not affect the generated code. Not even a little. They're just here for the aesthetic (and the parsing). 😌

πŸŽ€ METHODS πŸŽ€

πŸ’– new

my $e = ExtUtils::XSpp::Node::Enum->new( name     => 'Bool',
                                         elements => [ ... ],
                                       );

Makes you a brand new ExtUtils::XSpp::Node::Enum. Slay. ✨

  • name is the name of the enumeration β€” or undef if it's an anonymous enumeration (yes, the shy ones exist, and we respect them πŸ™ˆ).
  • elements should only contain ExtUtils::XSpp::Node::EnumValue or ExtUtils::XSpp::Node::Raw objects. Nothing else, fr fr.

πŸ‘‘ ACCESSORS πŸ‘‘

πŸ¦‹ name

Returns the name of the enumeration. If it's anonymous, you get undef back. That's it, that's the whole thing. πŸ’œ

🌈 elements

An array reference. It contains mostly ExtUtils::XSpp::Node::EnumValue β€” but ngl, it can contain other kinds of nodes too. So don't be shocked when it does. πŸ’€


perl v5.40.1 Β· 2026-07-03 β€” that's the version and date stamp, bestie, and that's a wrap on this little manpage πŸŽ€βœ¨ go forth and enumerate πŸ¦‹πŸ’–

πŸ“¦ where this page comes from