SPVM::Short(3)
β¨ SPVM::Short β¨
Okay bestie, welcome to SPVM::Short β it's a page from the SPVM::Short(3) manual (yes, the Perl one, section 3, we love a classic) π
π Name π
SPVM::Short β literally just a short value living its best life as an object. No cap, that's the whole vibe π¦
πΈ Description πΈ
So the Short class in SPVM represents a short value as an object. That's it, that's the gig. It takes something that would normally be a plain little short and gives it main character energy by wrapping it in an object π
π Usage π
Here's how you actually use it, bestie:
my $short_object = Short->new(5);
my $short_value = $short_object->value;
See? You make one with Short->new(5), then you grab the value back out with ->value. Slay β¨
π¦ Details π¦
- This class is immutable β so once it's made, it stays exactly how it is. No take-backsies, periodt π
- This class is automatically loaded β it just shows up ready to go, no extra work from you. Iconic behaviour fr fr π«Ά
π Interfaces π
Stringableβ yeah, it's a Stringable. We'll get to thatto_stringbusiness in a sec π
π Fields π
π value
has value : ro short;
This is the value. Read-only (: ro), obviously β did you not hear the whole immutable thing? π
π Class Methods π
β new
static method new : Short ($value : int);
Creates a new Short object with a short $value. You hand it a value, it hands you back a whole object. Trading up, honestly π
π§ Instance Methods π§
π to_string
method to_string : string ();
Casts the value to string type and returns it. Boom, now it's a string. Glow-up complete β¨
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
And that's the whole page, bestie! π«Ά This lil masterpiece is from perl v5.42.2, dated 2026-02-03, and it's SPVM::Short(3) β go forth and wrap your shorts in objects, you absolute icon ππ¦π
π¦ 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