ExtUti...gument(3pm)
β¨ NAME β¨
ExtUtils::XSpp::Node::Argument β the node that's literally just holding one single method-or-function argument (yes bestie, this is from the ExtUtils::XSpp family of manual pages, Perl section 3, and we're about to make it make sense π
)
πΈ DESCRIPTION πΈ
So picture this: ExtUtils::XSpp::Node::Argument is a subclass of ExtUtils::XSpp::Node, and it represents exactly one argument of a single function or method. Like, one. Not the whole signature, just the one lil guy. π
Take something like this:
int foo = 0.
That right there would translate into an ExtUtils::XSpp::Node::Argument where:
- its
typeis set toint - its
nameis set tofoo - its
defaultis set to0.
no cap, that's the whole vibe. it's giving "one argument, fully catalogued, main character energy" π
π¦ METHODS π¦
π new
Creates a brand new ExtUtils::XSpp::Node::Argument. Baby node, fresh out the box.
Named parameters are:
typeβ tells you the C++ argument typenameβ tells you the variable namedefaultβ and optionally, the default value of the argument
π uses_length
Returns true if the argument uses the XS length feature, and false otherwise. Simple as. β β
π implementation_name
Returns the exact same thing as the name method... unless the argument is of the %length(something) variant. π
And if it is that variant? Then implementation_name returns a munged version of the name β one that deals with the name mangling that xsubpp does β and that munged name is XSauto_length_of_somthing.
π fix_name_in_code
You hand it a code string, and it replaces any occurrences of the name of this Argument with its implementation name. β¨
But here's the chill part: if the implementation name is the same as the name β which, honestly, is the most likely case β then the code stays completely untouched. Not a single character moved. π«Ά
It returns the potentially modified code.
π ACCESSORS π
β type
Returns the type of the argument.
β name
Returns the variable name of the argument variable.
β default
Returns the default for the function parameter, if there is one.
β has_default
Returns whether there is a default for the function parameter. (the vibes check: default or no default π)
β function
Returns a reference to the containing function/method. iykyk, it's the parent vibes.
β index
Returns the 0-based index of the argument in the argument list. Counting from zero because of course it does, it's Perl's ecosystem bestie π
lowkey iconic that you read the whole thing. go forth and wrangle those XS arguments π
mwah π this page ships with perl v5.40.1, and that footer date on the original was 2026-07-03 β so jot that down, bestie, it's the version-and-date tea for this one πβ¨
π¦ 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