1Clownfish::Integer(3) User Contributed Perl DocumentationClownfish::Integer(3)
2
3
4
6 Clownfish::Integer - Immutable 64-bit signed integer.
7
9 my $integer = Clownfish::Integer->new(7);
10 my $value = $integer->get_value;
11
14 new
15 my $integer = Clownfish::Integer->new($value);
16
17 Return a new Integer.
18
19 ยท value - Initial value.
20
22 get_value
23 my $int = $integer->get_value();
24
25 Return the value of the Integer.
26
27 to_f64
28 my $float = $integer->to_f64();
29
30 Convert the Integer to floating point.
31
32 compare_to
33 my $int = $integer->compare_to($other);
34
35 Indicate whether one number is less than, equal to, or greater than
36 another. Throws an exception if "other" is neither an Integer nor a
37 Float.
38
39 Returns: 0 if the numbers are equal, a negative number if "self" is
40 less than "other", and a positive number if "self" is greater than
41 "other".
42
43 clone
44 my $result = $integer->clone();
45
46 Return a clone of the object.
47
49 Clownfish::Integer isa Clownfish::Obj.
50
51
52
53perl v5.28.0 2018-07-14 Clownfish::Integer(3)