ExtUti...Package(3pm)

πŸ’– ExtUtils::XSpp::Node::Package β€” the manual, but make it cute (3pm) πŸ’–

okay bestie, so this is a Perl manual page from the User Contributed Perl Documentation collection, section 3pm (that's "perl module" territory, iykyk), and honestly? it's short, it's slay, let's go πŸ¦‹


✨ NAME ✨

ExtUtils::XSpp::Node::Package β€” a whole Node that represents a Perl package πŸ‘‘


🌸 DESCRIPTION 🌸

So ExtUtils::XSpp::Node::Package is an ExtUtils::XSpp::Node subclass, and what it does is represent a Perl package. Which means it's literally acting as a container 🫢 β€” a container for methods (go peek at its sub-class, ExtUtils::XSpp::Node::Class, for the method-y vibes) or for functions. It holds them. That's its whole main character job. periodt.

A literal ExtUtils::XSpp::Node::Package would, for example, get created from something exactly like this:

%package{Some::Perl::Namespace}

and then that gets compiled into a brand new XS line, a la:

MODULE=$WhateverCurrentModule PACKAGE=Some::Perl::Namespace

no cap, that's the glow-up it goes through ✨


πŸŽ€ METHODS πŸŽ€

🌈 new

Creates a new ExtUtils::XSpp::Node::Package. Baby's first package node, iconic πŸ’…

Named parameters, and there are two of them:

  • cpp_name β€” this is the C++ class name (if there even is one, no pressure).
  • perl_name β€” this is the name of the Perl package.

and here's the little trick, bestie: if perl_name is not specified, but cpp_name is, then perl_name just defaults to cpp_name. it's giving "copy your friend's homework but change nothing" 😭


πŸ¦‹ ACCESSORS πŸ¦‹

⭐ cpp_name

Returns the C++ name for the package. Heads up: this is the one that will be used for namespaces. so like, keep that in mind fr fr.

⭐ perl_name

Returns the Perl name for the package. simple. elegant. ate. πŸ’–

⭐ set_perl_name

The setter for the Perl package name. it sets. that's it. that's the whole vibe. πŸ“


and that's the page!! mwah πŸ’‹

quick shoutout to the copyright/licensing energy of a perl manpage: this one's from perl v5.40.1, dated 2026-07-03, living in the User Contributed Perl Documentation section under ExtUti...Package(3pm) πŸ’œ thanks for coming to my ted talk, go read the actual docs, ily, bye 🧚
πŸ“¦ where this page comes from