ExtUti...Member(3pm)

✨ NAME ✨

ExtUtils::XSpp::Node::Member β€” it's the node that represents a class member variable, bestie πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: ExtUtils::XSpp::Node::Member is a sub-class of ExtUtils::XSpp::Node, and its whole entire job is representing one single member variable inside a class. Like one of these cuties:

class FooBar {
  int foo; // <-- this one
}

See that int foo;? Yeah. That's the vibe. That's the member. πŸ‘‘

But here's the thing you actually need to know, and I'm not gonna gatekeep it: member declarations are literally invisible to the XS code generator. They produce no XS code at all unless you decorate them with either %get or %set. No decoration, no code. Periodt. πŸ’€


🌸 METHODS 🌸

πŸŽ€ new

Makes you a brand new ExtUtils::XSpp::Node::Member. Fresh out the box, main character energy.

Named parameters you can pass in, and yes you need the names:

  • cpp_name β€” the C++ name of the member
  • perl_name β€” the Perl name of the member. If you don't say anything, it just defaults to the same thing as cpp_name 🫢
  • type β€” the (C++) type of the member
  • class β€” and finally, this one's an ExtUtils::XSpp::Node::Class

πŸ”₯ resolve_typemaps

Goes and fetches the ExtUtils::XSpp::Typemap object for the type, straight from the typemap registry, and then stores a reference to that object. It's giving errand runner. It slays. ✨


πŸ‘‘ ACCESSORS πŸ‘‘

πŸ’œ cpp_name

Returns the C++ name of the member. That's it. That's the whole function.

🌈 perl_name

Returns the Perl name of the member β€” and if nobody set one, it defaults to the same as the C++ one. Twin behavior fr fr.

πŸŽ€ set_perl_name

Sets the Perl name of the member. Now you get to pick it yourself, iconic.

⭐ type

Returns the C++ type for the member.

🧚 class

Returns the class β€” an ExtUtils::XSpp::Node::Class β€” that the member belongs to. Found family moment.

πŸ’… access

Returns 'public', 'protected' or 'private', depending on the member's access declaration. Choose your fighter.

πŸ’– typemap

Returns the typemap for the member type.

πŸ“ set_typemap( typemap )

Sets the typemap for the member type. Pass it in, it goes in.


That's the whole page, no cap! Everything you just read is from the ExtUti...Member(3pm) page β€” User Contributed Perl Documentation, perl v5.40.1, dated 2026-07-03. Bye bestie, go write some XS πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from