Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.215.727 Times

Storable 2.16

  Date Added: April 02, 2010  |  Visits: 800

Storable

Report Broken Link
Printer Friendly Version


Product Homepage
Download (89 downloads)



Storable package contains persistence for Perl data structures. SYNOPSIS use Storable; store %table, file; $hashref = retrieve(file); use Storable qw(nstore store_fd nstore_fd freeze thaw dclone); # Network order nstore %table, file; $hashref = retrieve(file); # There is NO nretrieve() # Storing to and retrieving from an already opened file store_fd @array, *STDOUT; nstore_fd %table, *STDOUT; $aryref = fd_retrieve(*SOCKET); $hashref = fd_retrieve(*SOCKET); # Serializing to memory $serialized = freeze %table; %table_clone = %{ thaw($serialized) }; # Deep (recursive) cloning $cloneref = dclone($ref); # Advisory locking use Storable qw(lock_store lock_nstore lock_retrieve) lock_store %table, file; lock_nstore %table, file; $hashref = lock_retrieve(file); The Storable package brings persistence to your Perl data structures containing SCALAR, ARRAY, HASH or REF objects, i.e. anything that can be conveniently stored to disk and retrieved at a later time. It can be used in the regular procedural way by calling store with a reference to the object to be stored, along with the file name where the image should be written. The routine returns undef for I/O problems or other internal error, a true value otherwise. Serious errors are propagated as a die exception. To retrieve data stored to disk, use retrieve with a file name. The objects stored into that file are recreated into memory for you, and a reference to the root object is returned. In case an I/O error occurs while reading, undef is returned instead. Other serious errors are propagated via die. Since storage is performed recursively, you might want to stuff references to objects that share a lot of common data into a single array or hash table, and then store that object. That way, when you retrieve back the whole thing, the objects will continue to share what they originally shared. At the cost of a slight header overhead, you may store to an already opened file descriptor using the store_fd routine, and retrieve from a file via fd_retrieve. Those names arent imported by default, so you will have to do that explicitly if you need those routines. The file descriptor you supply must be already opened, for read if youre going to retrieve and for write if you wish to store. store_fd(%table, *STDOUT) || die "cant store to stdoutn"; $hashref = fd_retrieve(*STDIN); You can also store data in network order to allow easy sharing across multiple platforms, or when storing on a socket known to be remotely connected. The routines to call have an initial n prefix for network, as in nstore and nstore_fd. At retrieval time, your data will be correctly restored so you dont have to know whether youre restoring from native or network ordered data. Double values are stored stringified to ensure portability as well, at the slight risk of loosing some precision in the last decimals. When using fd_retrieve, objects are retrieved in sequence, one object (i.e. one recursive tree) per associated store_fd. If youre more from the object-oriented camp, you can inherit from Storable and directly store your objects by invoking store as a method. The fact that the root of the to-be-stored tree is a blessed reference (i.e. an object) is special-cased so that the retrieve does not provide a reference to that object but rather the blessed object reference itself. (Otherwise, youd get a reference to that blessed object)..

Requirements: No special requirements
Platforms: Linux
Keyword: Data Fd File Libraries Programming Reference To Retrieve Stdout Storable Store
Users rating: 0/10

License: Freeware Size: 174.08 KB
USER REVIEWS
More Reviews or Write Review


STORABLE RELATED
Libraries  -  File::Drawing 0.01
File::Drawing release, revise and retrieve contents to/from a drawing program module. SYNOPSIS ########## # Subroutine interface # use File::Drawing qw( dod_date dod_drawing_number number2pm pm2number obsolete broken backup); $date =...
64.51 KB  
Libraries  -  Sunrise Data Dictionary 1.00
Sunrise Data Dictionary is a library for hashtable storage of arbitrary data objects with built-in reference counting and guaranteed order iteration for the C programming language. Sunrise Data Dictionary library can participate in external...
174.08 KB  
Libraries  -  Data::Encrypted 0.07
Data::Encrypted is a Perl module to transparently store encrypted data via RSA. SYNOPSIS # functional interface: use Data::Encrypted file => "./.$0-encrypted-data", qw(encrypted); # note: login and password are not *really* the login and #...
7.17 KB  
Libraries  -  File::Size 0.06
SYNOPSIS Get the size for directory /etc/ with the block size of 1024 while following symbolic links: my $obj = File::Size->new( dir => /etc/, blocksize => 1024, followsymlinks => 1, humanreadable => 1 ); print $obj->getsize(), "n";...
3.07 KB  
Libraries  -  Data::Secs2 0.09
Data::Secs2 is a Perl module to pack, unpack, format, transform from Perl data SEMI E5-94 nested data. SYNOPSIS ##### # Subroutine interface # use Data::Secs2 qw(arrayify config listify neuterify numberify perlify perl_typify secsify...
98.3 KB  
Video Players  -  Free Mac Android Data Recovery 1.0.30
Sometimes, the lost or deleted contacts might cause you a lot of troubles. While this software enables you to avoid those potential troubles by recovering your lost contacts. Yes, this is what Free Mac Android Data Recovery does. It helps you to...
26.5 MB  
File Cataloguers  -  File List Generator 1.0
ReStoring Data's File List Generator Freeware software filters, prints, and organizes via a file's: name, type, size, created date, and date last modified. It was developed by the Research and Development team to aid data recovery service clients...
5.63 MB  
Libraries  -  Clarion 1.01
Clarion is a Perl extension for reading CLARION data files. ABSTRACT This is a perl module to access CLARION 2.1 files. At the moment only read access to the files are provided by this package. "Encrypted" files are processed transparently,...
6.14 KB  
Libraries  -  GDS2 2.09a
GDS2 is a module for quickly creating programs to read and/or write GDS2 files. Create Method new - open gds2 file usage: my $gds2File = new GDS2(-fileName => "filename.gds2"); ## to read my $gds2File2 = new GDS2(-fileName =>...
10.24 KB  
Utilities  -  Free Format Recovery Software 6.0.0
Free Format Data Recovery software download for Windows to recover data after format device or device shows raw file system inaccessible not recognized with all kinds of digital devices supported lik hdd, usb flash drive, memory card. Undo quick...
4.08 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB