SPVM::C...r::Long(3)
πΈ Name πΈ
okay so bestie, this is SPVM::Comparator::Long(3), hanging out in the User Contributed Perl Documentation like it owns the place. It's the interface type for a long comparation callback, and the official descriptor is Interface Type for long Comparation Callback. No cap, that's the whole name section π
β¨ Usage β¨
Here's the usage, copied exactly because we do not play with syntax:
use Comparator::Long;
my $comparator = (Comparator::Long)method : int ($a : long, $b : long); {
return $a <=> $b;
};
my $result = $comparator->(3, 5);
So you cast a method to Comparator::Long, it compares 3 and 5, and $result catches what comes back. Cute. Obsessed. π«Ά
π Description π
Comparator::Long is the interface type for the long comparation callback. That's it. That's the vibe. It's giving contract-for-comparison energy, and I respect it β¨
π¦ Interface Methods π¦
π the required method π
required method : int ($a : long, $b : long);
This method must receive two values whose types are long, and then it returns the following value:
- if the first argument is greater than the second argument, it returns
1 - if the first argument is lower than the second argument, it returns
-1 - if the first argument is equal to the second argument, it returns
0
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
okay thatβs the whole page, bestie π
it comes from perl v5.42.2, dated 2026-02-03, and the footer title is SPVM::C...r::Long(3) β mwah π«Άβ¨
π¦ 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