SPVM::Short(3)

πŸ“¦ version 0.990125, in alpine 3.24

✨ 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 that to_string business 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 (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