SPVM::C...tor::Int(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸ’– Name πŸ’–

okay so this manual page is SPVM::Comparator::Int(3), and it comes from User Contributed Perl Documentation. The main character is SPVM::Comparator::Int β€” the interface type for the int comparation callback. no cap, that’s literally its whole identity ✨

  • SPVM::Comparator::Int β€” the interface type for the int comparation callback.

✨ Usage ✨

bestie, here’s the vibe β€” you use Comparator::Int like this, and yes, the code is exactly this:

use Comparator::Int;

my $comparator = (Comparator::Int)method : int ($a : int, $b : int); {
  return $a <=> $b;
};

my $result = $comparator->(3, 5);

πŸ¦‹ Description πŸ¦‹

Comparator::Int is the interface type for the int comparation callback. that’s it, that’s the tea πŸ“


🌸 Interface Methods 🌸

there’s exactly one required method, and it’s giving very specific instructions:

required method : int ($a : int, $b : int);

This method must receive two values whose types are int, and it has to return 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

periodt, those are the rules πŸ’…


  • Copyright (c) 2023 Yuki Kimoto
  • MIT License

This page came from User Contributed Perl Documentation, perl v5.42.2, dated 2026-02-03. go off and compare those ints, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from