Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Array::Virtual 0.04

    Download button

    No screenshots available
    Downloads: 234  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Philip Crow | More programs
    Perl Artistic License / FREE
    February 2nd, 2010, 18:41 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Array::Virtual description

    Provides disk based arrays implemented via tied hashes

    Array::Virtual is a Perl module that allows a user to tie an array to a disk file. The actual storage scheme is a hash tied via SDBM_File.

    The module optimizes push, pop, shift, and unshift for speed. For SPLICE, it uses the method inherited from Tie::Array. Splicing requires moving elements around. Since there is really no short cut for that, there is not a real way to optimize this routine, thus it is borrowed. Genuine DELETE is not yet supported. Attempting to call DELETE will result in the inherited croak from Tie::Array.

    Once you issue a line like tie @myarray, "Virtual", "diskname", 0664; you may use @myarray just as you would any other array. The array will be stored in a pair of files called diskname.array.dir and diskname.array.pag. Any path is preserved through the call, but .array.... is always appended. (This module puts on the array extension, SDBM_File puts on the other extensions.)

    If the disk files for the array already exists, the array is opened and its contents are the same as the last time the disk array was used. If you want to purge the disk array, simply unlink its files either inside or outside of perl. Say something like unlink \< diskname.array.*\ >.

    If the files cannot be found, they are created with the given permissions if supplied (or with 0666 modified by your umask by default).

    SYNOPSIS

     use Array::Virtual;

     tie @myarray, "Array::Virtual", "diskname", 0664;
     push @myarray, "value";
     my $stackpop = pop @myarray;
     unshift @myarray, "value1";
     my $queuefront = shift @myarray;
     .
     .
     .
     etc.



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    disk-based arrays | tied hashes | Perl module | virtual | arrays | hashes

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM