1Array::IntSpan::Fields(U3s)er Contributed Perl DocumentatAirornay::IntSpan::Fields(3)
2
3
4

NAME

6       Array::IntSpan::Fields -  IntSpan array using integer fields as indices
7

SYNOPSIS

9         use Array::IntSpan::Fields;
10
11         my $foo = Array::IntSpan::Fields
12          ->new( '1.2.4',
13                 ['0.0.1','0.1.0','ab'],
14                 ['1.0.0','1.0.3','cd']);
15
16         print "Address 0.0.15 has ".$foo->lookup("0.0.15").".\n";
17
18         $foo->set_range('1.0.4','1.1.0','ef') ;
19

DESCRIPTION

21       "Array::IntSpan::Fields" brings the advantages of "Array::IntSpan" to
22       indices made of integer fields like an IP address and an ANSI SS7 point
23       code.
24
25       The number of integer and their maximum value is defined when calling
26       the constructor (or the "set_format" method). The example in the
27       synopsis defines an indice with 3 fields where their maximum values are
28       1,3,15 (or 0x1,0x3,0xf).
29
30       This module converts the fields into integer before storing them into
31       the Array::IntSpan module.
32

CONSTRUCTOR

34   new (...)
35       The first parameter defines the size of the integer of the fields, in
36       number of bits. For an IP address, the field definition would be
37       "8,8,8,8".
38

METHODS

40       All methods of Array::IntSpan are available.
41
42   set_format( field_description )
43       Set another field description. Beware: no conversion or checking is
44       done. When changing the format, old indices may become illegal.
45
46   int_to_field ( integer )
47       Returns the field representation of the integer.
48
49   field_to_int ( field )
50       Returns the integer value of the field. May craok if the fields values
51       are too great with respect to the filed description.
52

AUTHOR

54       Dominique Dumont, ddumont@cpan.org
55
56       Copyright (c) 2003 Dominique Dumont. All rights reserved.
57
58       This module is distributed under the Artistic 2.0 License. See
59       https://www.perlfoundation.org/artistic-license-20.html
60
61
62
63perl v5.32.1                      2021-01-26         Array::IntSpan::Fields(3)
Impressum