Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    IPC::MMA 0.81

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Craig MacKenna | More programs
    Perl Artistic License / FREE
    February 8th, 2012, 03:48 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    IPC::MMA description

    Shared Memory using Ralf Engelschall's mm library

    IPC::MMA is a Perl module that allows data to be shared among related Unix/Linux processes in a straightforward way. It provides methods to create and destroy shared memory segments and to create, access, and maintain data structures within segments. Perl scalars, arrays, and hashes can be stored in shared memory. This version of IPC::MMA will not store references.

    IPC::MMA is a superset of Arthur Choung's IPC::MM module, adding arrays and allowing any Perl scalar to be used as a hash/BTree key rather than just C strings. IPC::MMA hashes are like IPC::MM BTrees in that they return keys in sorted order in each, keys, and next operations.

    An IPC::MMA array can store data in any of six ways, including general-purpose scalars, signed or unsigned integers, floating-point numbers / large integers, fixed-length strings/records, and booleans at one bit per array element.

    SYNOPSIS

     use IPC::MMA;

     $mm = mm_create(memory_size, path_to_lockfile);
     $scalar = mm_make_scalar($mm);
     $array = mm_make_array($mm, type [, entries[, option]]);
     $hash = mm_make_hash($mm [, entries]);
     tie $tiedScalar, 'IPC::MMA::Scalar', $scalar;
     tie @tiedArray, 'IPC::MMA::Array', $array;
     tie %tiedHash, 'IPC::MMA::Hash', $hash;

     mm_lock($mm, MM_LOCK_RD);
     mm_lock($mm, MM_LOCK_RW);
     mm_unlock($mm);

     DIRECT CALLS TIED EQUIVALENTS
     $ok = mm_scalar_store($scalar, $value); $tiedScalar = $value;
     $value = mm_scalar_fetch($scalar); $value = $tiedScalar;
     mm_free_scalar($scalar)

     $ok = mm_array_store($array, $index, $value); $tiedArray[$index] = $value;
     $value = mm_array_fetch($array, $index); $value = $tiedArray[$index];
     $entries = mm_array_push($array, list); $entries = push @tiedArray, list;
     $value = mm_array_pop($array); $value = pop @tiedArray;
     $value = mm_array_shift($array); $value = shift @tiedArray;
     $entries = mm_array_unshift($array, list); $entries = unshift @tiedArray, list;
     if (mm_array_exists($array, $index)) {...} if (exists $tiedArray[$index]) { ... }
     $value = mm_array_delete($array, $index); $value = delete $tiedArray[$index];
     @dels=mm_array_splice($array,$ix,$delCt,list); @dels=splice @tiedArray,$ix,$delCt,list;
     mm_array_clear($array [, $entries]); $tiedArray = ();
     $entries = mm_array_fetchsize($array) $entries = scalar(@tiedArray)
     ($entries,$shiftCt,$type,$opt) = mm_array_status($array);
     mm_free_array($array)

     $ok = mm_hash_store($hash, $key, $value); $tiedHash{$key} = $value;
     $value = mm_hash_fetch($hash, $key); $value = $tiedHash{$key};
     $value = mm_hash_delete($hash, $key); $value = delete $tiedHash{$key};
     if(mm_hash_exists($hash, $key)) {...} if (exists $tiedHash{$key}) {...}
     while(($key,$val)=mm_hash_entry($hash,$ix++)) while(($key,$val)=each %tiedHash)
     {...} {...}
     @keys = keys %tiedHash;
     @values = values %tiedHash;
     $entries = mm_hash_scalar($hash); $entries = scalar %tiedHash;
     mm_hash_clear($hash [, $entries]); @tiedHash = ();
     $key = mm_hash_first_key($array);
     $key = mm_hash_next_key($array, $key);
     mm_free_hash($hash);



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    shared memory | mm library | Perl module | shared | memory | library



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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