ExtUti...::Class(3pm)

πŸ’– ExtUti...::Class ✨

okay bestie, welcome to ExtUtils::XSpp::Node::Class β€” it's a class node, and yes it lives in the ExtUtils::XSpp::Node:: family, it's giving very much inherits from Package energy. πŸ‘‘


🌸 NAME 🌸

ExtUtils::XSpp::Node::Class β€” a class. literally a class. and it inherits from Package, of course it does. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is an ExtUtils::XSpp::Node::Package sub-class, and what it represents is a class declaration, like this one right here:

%name{PerlClassName} class MyClass : public BaseClass
{
  ...
}

iconic. no notes. πŸŽ€

now the important deets: the Perl-level class name and the C++ class name attributes? those are inherited from the ExtUtils::XSpp::Node::Package class. so don't come looking for them here, they were already serving looks in the parent. ✨


πŸ’… METHODS πŸ’…

🌈 new

Creates a new ExtUtils::XSpp::Node::Class object. brand new, fresh out the box, main character energy. ⭐

The optional named parameters are:

  • methods β€” can be a reference to an array of methods (ExtUtils::XSpp::Node::Method) of the class.
  • base_classes β€” a reference to an array of base classes (which are ExtUtils::XSpp::Node::Class objects, yes, it's classes all the way down πŸ’€).
  • catch β€” may be a list of exception names that all methods in the class handle. all of them. collectively. periodt.

🧚 add_methods

Adds new methods to the class. by default, their scope is public. (as it should be, we're not hiding 🫢)

It takes an arbitrary number of arguments, and processes them in order β€” so the order you pass them literally matters, bestie.

here's the vibe check on what each argument can be:

  • If an argument is an ExtUtils::XSpp::Node::Access, the current method scope gets changed accordingly for all the following methods. so it's a switch, and everything after it lives under the new scope. ✨
  • If an argument is an ExtUtils::XSpp::Node::Method, it gets added to the list of methods of the class. then the method's class name is set to the current class, and its scope is set to the current method scope.

no cap, that's the whole thing. πŸŽ€


πŸ‘‘ ACCESSORS πŸ‘‘

πŸ’œ methods

Returns the internal reference to the array of methods in this class. and each of those methods is an ExtUtils::XSpp::Node::Method. every single one. πŸ’…


πŸ“ base_classes

Returns the internal reference to the array of base classes of this class. 🌸

okay so this one has a lil caveat and you need to know it: If the base classes have been defined in the same file, these are the complete class objects including method definitions. but if they haven't, then only the C++ and Perl name of the class are available as attributes. that's it. that's all you get. 😭

and that's the page, bestie!! this was written up for perl v5.40.1 and dated 2026-07-03, so if you're reading this from the future or the past, respect the timeline. πŸ¦‹βœ¨ slay, bye!! πŸ’–

πŸ“¦ where this page comes from