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 areExtUtils::XSpp::Node::Classobjects, 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
- ubuntu stonking: libextutils-xspp-perl 0.1900-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms