---
name: "ExtUtils::XSpp::Node::Enum"
section: "3pm"
platform: "linux"
package: "libextutils-xspp-perl"
version: "0.1800-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ExtUtils::XSpp::Node::Enum"
---

# ExtUtils::XSpp::Node::Enum(3pm)

Node representing an enum declaration

## NAME

ExtUtils::XSpp::Node::Enum - Node representing an enum declaration

## DESCRIPTION

An ExtUtils::XSpp::Node subclass representing an `"enum"` declaration. As an example

```
    enum Bool
    {
        FALSE = 0,
        TRUE
    };
```

will create an `"ExtUtils::XSpp::Node::Enum"` object with `"name"` `"Bool"` and two ExtUtils::XSpp::Node::EnumValue values in the `"arguments"` array.

Enumerations do not affect the generated code.

## METHODS

### new

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

Creates a new `"ExtUtils::XSpp::Node::Enum"`.

`"name"` gives the name of the enumeration, `"undef"` for anonymous enumerations.  `"elements"` should only contain ExtUtils::XSpp::Node::EnumValue or ExtUtils::XSpp::Node::Raw objects.

## ACCESSORS

### name

Returns the name of the enumeration, or `"undef"` for anonymous enumerations.

### elements

An array reference containing mostly ExtUtils::XSpp::Node::EnumValue (it can contain other kinds of nodes).
