SPVM::Native::Arg(3)
β¨ NAME β¨
Okay so this is SPVM::Native::Arg β it's a page from the SPVM manual (SPVM::Native::Arg(3), and yes bestie, it's a perl-documented one, we love that for us). It's literally all about Information of Arguments π
π DESCRIPTION π
The Native::Arg class of SPVM has methods to manipulate information of arguments. That's it, that's the vibe β it's your little handle for poking at what an argument is π
π¦ USAGE π¦
Here's the whole flow, no cap:
my $runtime = Native->get_current_runtime;
my $basic_type = $runtime->get_basic_type_by_name("Point");
my $method = $basic_type->get_method_by_name("new");
my $arg = $method->get_arg_by_index(0);
my $arg_index = $arg->get_index;
Grab the runtime, grab a basic type by name, grab a method off it, grab arg number 0, then ask that arg for its index. Slay. β¨
π INSTANCE METHODS π
β get_index
method get_index : int ();
Returns the index of this argument. As in β which slot this arg sits in. Numbered vibes only π’
β get_basic_type
method get_basic_type : Native::BasicType ();
Return the basic type of this argument. (Yes, the original says "Return" not "Returns" β we respect the icon's choices π«Ά)
β get_type_dimension
method get_type_dimension : int ();
Returns the type dimension of this argument. Dimension check: passed π
β get_type_flag
method get_type_flag : int ();
Returns the type flag of this argument. Flags are so main character π©
β is_optional
method is_optional : int ();
If this argument is an optional argument, returns 1, otherwise returns 0. Simple binary, we love a clear answer π
β get_default_value_byte
method get_default_value_byte : byte ();
Returns the default value of the optional argument arg of the "byte" type.
β get_default_value_short
method get_default_value_short : short ();
Returns the default value of the optional argument arg of the "short" type.
β get_default_value_int
method get_default_value_int : int ();
Returns the default value of the optional argument arg of the "int" type.
β get_default_value_long
method get_default_value_long : long ();
Returns the default value of the optional argument arg of the "long" type.
β get_default_value_float
method get_default_value_float : float ();
Returns the default value of the optional argument arg of the "float" type.
β get_default_value_double
method get_default_value_double : double ();
Returns the default value of the optional argument arg of the "double" type.
β get_default_value_object
method get_default_value_object : object ();
Returns the default value of the optional argument arg of an object type. Object defaults, we stan π§
Bestie note: there's one getter per default-value flavour βbyte,short,int,long,float,double, andobject. Pick the one that matches your arg's type, iykyk π₯
π SEE ALSO π
Native::MethodNative::BasicTypeNative::RuntimeNative
Go read those next, they're the friend group π
π COPYRIGHT & LICENSE π
Copyright (c) 2023 Yuki Kimoto
MIT License
And that's the whole page, bestie β perl v5.42.2, dated 2026-02-03, filed under SPVM::Native::Arg(3). Go forth and inspect those args πβ¨π
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms