ExtUti...umValue(3pm)

πŸ’– ExtUtils::XSpp::Node::EnumValue πŸ’–

okay bestie, so this one is ExtUtils::XSpp::Node::EnumValue from the User Contributed Perl Documentation, and it's literally one of the XSpp node classes β€” iykyk. let's get into it 🫢


✨ NAME ✨

ExtUtils::XSpp::Node::EnumValue β€” the Node representing an enum element πŸ’…


🌸 DESCRIPTION 🌸

so ExtUtils::XSpp::Node::EnumValue is a subclass of ExtUtils::XSpp::Node, and it represents an enum declaration. like, that's its whole job. it ate.

say you write something like this:

enum Bool
{
    FALSE = 0,
    TRUE
};

that? that right there is giving two ExtUtils::XSpp::Node::EnumValue objects, no cap:

  • the first one has name FALSE and value 0 πŸŽ€
  • the second one has name TRUE and no value at all (it's giving mystery, it's giving undefined πŸ™ˆ)
and here's the tea bestie: enumerations do not affect the generated code. like, zero impact. they're just vibing in the tree. ✨

πŸ”₯ METHODS πŸ”₯

🌟 new

my $e = ExtUtils::XSpp::Node::EnumValue->new( name  => 'FALSE',
                                              value => '0x1 | 0x4',
                                              );

creates a brand new ExtUtils::XSpp::Node::EnumValue, slay πŸ’…

and just so you know β€” value is optional. so if you don't pass it, that's valid, she's allowed to be mysterious. πŸ¦‹


πŸ‘‘ ACCESSORS πŸ‘‘

⭐ name

returns the name of the enumeration element. iconic, straightforward, no drama.

πŸ’œ value

returns the initializer of the enumeration element β€” or undef if there isn't one. yes, undef! the lowercase king of nothingness. πŸ’€


and that's the whole page, bestie, we ate and left no crumbs πŸ“

this was perl v5.40.1, dated 2026-07-03, brought to you by ExtUtils::XSpp::Node::EnumValue(3pm) β€” mwah, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from