.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Array::IntSpan::Fields 3pm" .TH Array::IntSpan::Fields 3pm "2020-03-30" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Array::IntSpan::Fields \- IntSpan array using integer fields as indices .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Array::IntSpan::Fields; \& \& my $foo = Array::IntSpan::Fields \& \->new( \*(Aq1.2.4\*(Aq, \& [\*(Aq0.0.1\*(Aq,\*(Aq0.1.0\*(Aq,\*(Aqab\*(Aq], \& [\*(Aq1.0.0\*(Aq,\*(Aq1.0.3\*(Aq,\*(Aqcd\*(Aq]); \& \& print "Address 0.0.15 has ".$foo\->lookup("0.0.15").".\en"; \& \& $foo\->set_range(\*(Aq1.0.4\*(Aq,\*(Aq1.1.0\*(Aq,\*(Aqef\*(Aq) ; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Array::IntSpan::Fields\*(C'\fR brings the advantages of \f(CW\*(C`Array::IntSpan\*(C'\fR to indices made of integer fields like an \s-1IP\s0 address and an \s-1ANSI SS7\s0 point code. .PP The number of integer and their maximum value is defined when calling the constructor (or the \f(CW\*(C`set_format\*(C'\fR method). The example in the synopsis defines an indice with 3 fields where their maximum values are 1,3,15 (or 0x1,0x3,0xf). .PP This module converts the fields into integer before storing them into the Array::IntSpan module. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .SS "new (...)" .IX Subsection "new (...)" The first parameter defines the size of the integer of the fields, in number of bits. For an \s-1IP\s0 address, the field definition would be \&\f(CW\*(C`8,8,8,8\*(C'\fR. .SH "METHODS" .IX Header "METHODS" All methods of Array::IntSpan are available. .SS "set_format( field_description )" .IX Subsection "set_format( field_description )" Set another field description. Beware: no conversion or checking is done. When changing the format, old indices may become illegal. .SS "int_to_field ( integer )" .IX Subsection "int_to_field ( integer )" Returns the field representation of the integer. .SS "field_to_int ( field )" .IX Subsection "field_to_int ( field )" Returns the integer value of the field. May craok if the fields values are too great with respect to the filed description. .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont, ddumont@cpan.org .PP Copyright (c) 2003 Dominique Dumont. All rights reserved. .PP This module is distributed under the Artistic 2.0 License. See https://www.perlfoundation.org/artistic\-license\-20.html