Set::In...ithmetic(3)
π NAME π
Okay bestie, you're reading Set::In...ithmetic(3), straight from the User Contributed Perl Documentation, and the actual module is Set::Infinite::Arithmetic. It's literally all about scalar operations used by quantize() and offset(). That's the whole vibe. β¨
π«Ά AUTHOR π«Ά
Flavio Soibelmann Glock - fglock@pucrs.br β show some love, that's the author. π
π %_MODE hash of subs π
This hash is giving mode energy, fr fr. Here are the calls:
$a->offset ( value => [1,2], mode => 'offset', unit => 'days' );
$a->offset ( value => [1,2, -5,-4], mode => 'offset', unit => 'days' );
note: ifmode = circle, then"-5"counts from end (like a Perl negative array index).
And then there's this one:
$a->offset ( value => [1,2], mode => 'offset', unit => 'days', strict => $a );
strictβ option'strict'will returnintersection($a,offset). Default: none.
π¦ %subs_offset2($object, $offset1, $offset2) π¦
The call looks like this:
&{ $subs_offset2{$unit} } ($object, $offset1, $offset2);
A hash of functions that return:
($object+$offset1, $object+$offset2)
in $unit context.
Returned $object+$offset1, $object+$offset2 may be scalars or objects. π
π %Offset_to_value($object, $offset) & %Init_quantizer($object) π
The calls are:
$Offset_to_value{$unit} ($object, $offset);
$Init_quantizer{$unit} ($object);
Maps an 'offset value' to a 'value'.
A hash of functions that return ( int($object) + $offset ) in $unit context.
Init_quantizer subroutines must be called before using subs_offset1 functions.
int(object)+offset is a scalar.
Offset_to_value is optimized for calling it multiple times on the same object, with different offsets. That's why there is a separate initialization subroutine.
$self->{offset} is created on initialization. It is an index used by the memoization cache. π§
That's the whole page, bestie! This gem is from perl v5.42.2, dated 2026-02-15, and the footer says Set::In...ithmetic(3). Go forth and offset/quantize with main character energy. π
β¨
π¦ where this page comes from
- alpine 3.24: perl-set-infinite-doc 0.65-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms