GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Array::IntSpan::Fields(3) User Contributed Perl Documentation Array::IntSpan::Fields(3)

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

  use Array::IntSpan::Fields;

  my $foo = Array::IntSpan::Fields
   ->new( '1.2.4',
          ['0.0.1','0.1.0','ab'],
          ['1.0.0','1.0.3','cd']);

  print "Address 0.0.15 has ".$foo->lookup("0.0.15").".\n";

  $foo->set_range('1.0.4','1.1.0','ef') ;

"Array::IntSpan::Fields" brings the advantages of "Array::IntSpan" to indices made of integer fields like an IP address and an ANSI SS7 point code.

The number of integer and their maximum value is defined when calling the constructor (or the "set_format" method). The example in the synopsis defines an indice with 3 fields where their maximum values are 1,3,15 (or 0x1,0x3,0xf).

This module converts the fields into integer before storing them into the Array::IntSpan module.

The first parameter defines the size of the integer of the fields, in number of bits. For an IP address, the field definition would be "8,8,8,8".

All methods of Array::IntSpan are available.

Set another field description. Beware: no conversion or checking is done. When changing the format, old indices may become illegal.

Returns the field representation of the integer.

Returns the integer value of the field. May craok if the fields values are too great with respect to the filed description.

Dominique Dumont, ddumont@cpan.org

Copyright (c) 2003 Dominique Dumont. All rights reserved.

This module is distributed under the Artistic 2.0 License. See https://www.perlfoundation.org/artistic-license-20.html

2020-03-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.