首页 | Linux | 论坛 | 精华 | 博客 | 资料 | 手册 | 知识库 | 下载 | 人才 | 沙龙 | 搜索 | 登录 | 注册  
下载分类
操作系统
系统相关
网络互连
开发工具
应用程序
多媒体工具
游戏娱乐
资料视频
本类周下载TOP10
本类总下载TOP10
您的位置:自由软件库->开发工具->库文件->storable

首字母搜索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


软件名称: storable
授权方式: GPL
操作系统: Linux,FreeBSD,UNIX
软件大小: 178K
最新更新: 2012-09-16 11:13:11
软件简介: Storable - persistence for Perl data structures.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 aren  t 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 you  re going to retrieve and for write if you wish to store.
 store_fd(\%table, *STDOUT) || die "can  t store to stdout ";
$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 don  t have to know whether you  re 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 you  re 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, you  d get a reference to that blessed object).
相关论坛: 下载频道交流区 讨论区
立即下载

Storable-2.07.tar.gz
Storable-2.13.tar.gz
Storable-2.15.tar.gz
Storable-2.16.tar.gz
Storable-2.18.tar.gz
Storable-2.20.tar.gz
Storable-2.21.tar.gz
Storable-2.25.tar.gz
Storable-2.30.tar.gz
Storable-2.35.tar.gz
Storable-2.39.tar.gz

 Linux最新资讯更多>> 
·Evernote推进入华节奏:
·桌面操作系统 4 月最新
·Linux基金会:Linux成B
·中国联通升级HSPA+网络
·联通“随意打”论战:绝
·阿里巴巴集团30亿美元贷
·要以扫黄打非的精神进行
·内核源码,ARM架构上的
·Ubuntu 10.04版本企业云
·企业级Linux三国鼎立 与
·开源图像软件GIMP开发者
·不给Source就捣蛋?谈G
 IT最新资讯更多>> 
·大连外企500强急招java
·(内部推荐)EMC-Princ
·(内部推荐)EMC-greenpl
·页游公司招聘:运维开发
·赶集移动部门招聘前端开
·【北京】知名软件公司招
·有莫有C++ and C# and
·下班路上捡到一张工资表
·猎头代招:北京大型上市
·DSI猎头代招:华为-IP部
·上海诚聘JAVA工程师
·微软和苹果10大失败产品
·Darl McBride离开领导岗
·提升Qt的应用诺基亚即将
 综合:更多>> 
·PHP中strtotime函数使用
·五个常见 PHP数据库问题
·初探PHP单元测试利器:
·PHP开发人员容易忽略的
·逃离伪PHP程序员应该做
·大型Web应用运行时 PHP
·PHP企业级应用缓存技术
·PHP应用提速面面观
·用书签查询网站pr值
·PHP句法规则详解
·阴历-农历-转换类
·PHP定时执行任务的实现
·几种有用的变型 PHP中循
·PHP如何修改Linux或Uni
·PHP中全面阻止SQL注入式
·分享几个非常有用的PHP
·PHP面向对象法则
·优化PHP程序的方法
·orcale queue
·谁可以推荐几本经典的操
关于我们 | 联系方式 | 广告合作 | 诚聘英才 | 网站地图 | 友情链接 | 免费注册

Copyright © 2001-2006 ChinaUnix.net All Rights Reserved

感谢所有关心和支持过ChinaUnix的朋友们

京ICP证041476号