SPVM::Bool(3)
π SPVM::Bool β the manual, but make it a group chat
okay so bestie, welcome to SPVM::Bool (that's the SPVM::Bool page from the User Contributed Perl Documentation section, mwah π
β¨). Short version: it's the class that lets a boolean live its best life as an actual object instead of just being some sad little scalar. Obsessed already? same.
πΈ Name
SPVM::Bool β a boolean value, but make it an object. π
π¦ Description
The Bool class in SPVM represents a boolean value as an object. That's it, that's the whole vibe β a boolean, but with object energy. π
β¨ Usage
here's the whole flow, literally copy-paste ready:
use Bool;
my $true = Bool->TRUE;
my $false = Bool->FALSE;
my $true_value = $true->value;
my $false_value = $false->value;
look at her go π«Ά
π Details
- This class is immutable. no cap, she does not change. π
- This class is automatically loaded. she just shows up, main character energy fr. β¨
- The
Boolobject is different behavior in bool context. π this is the fun part:- If
valuefield is1, it is evaluated as true:
- If
if (Bool->TRUE) {
# Run
}
- If
valuefield is0, it is evaluated as false:
if (Bool->FALSE) {
# Not run
}
- The
truekeyword is the same asBool->TRUE. π
if (true) {
# Run
}
- The
falsekeyword is the same asBool->FALSE. π
if (false) {
# Not run
}
lowkey iconic how true is just shorthand for the whole singleton moment. iykyk.
π Fields
value
has value : ro byte;
The value. that's the field, that's the whole field, she's read-only (ro) and she's a byte. slay. π
π₯ Class Methods
TRUE
static method TRUE : Bool ();
Returns the true singleton object. yes, the singleton β there is exactly one of her and she ate. πβ
FALSE
static method FALSE : Bool ();
Returns the false singleton object. equally singular, equally iconic. ππ
π«Ά Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License
ok that's the whole page, no notes, go write some booleans bestie πππΈ
β mwah, this page was served up by perl v5.42.2 on 2026-02-03, and it's the SPVM::Bool(3) manual page. bye bestie, π§ββοΈππ
π¦ 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