SPVM::C...r::Long(3)

πŸ“¦ version 0.990125, in alpine 3.24

🌸 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 (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