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

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

Serving Software Downloads in 976 Categories, Downloaded 32.390.507 Times

Data::Serializer 0.41

  Date Added: July 14, 2010  |  Visits: 679


Report Broken Link
Printer Friendly Version

Product Homepage
Download (74 downloads)

Data::Serializer package contains modules that serialize data structures. SYNOPSIS use Data::Serializer; $obj = Data::Serializer->new(); $obj = Data::Serializer->new( serializer => Storable, digester => MD5, cipher => DES, secret => my secret, compress => 1, ); $serialized = $obj->serialize({a => [1,2,3],b => 5}); $deserialized = $obj->deserialize($serialized); print "$deserialized->{b}n"; Provides a unified interface to the various serializing modules currently available. Adds the functionality of both compression and encryption. EXAMPLES Please see Data::Serializer::Cookbook(3) METHODS new - constructor $obj = Data::Serializer->new(); $obj = Data::Serializer->new( serializer => Data::Dumper, digester => SHA-256, cipher => Blowfish, secret => undef, portable => 1, compress => 0, serializer_token => 1, options => {}, ); new is the constructor object for Data::Serializer objects. The default serializer is Data::Dumper The default digester is SHA-256 The default cipher is Blowfish The default secret is undef The default portable is 1 The default encoding is hex The default compress is 0 The default compressor is Compress::Zlib The default serializer_token is 1 The default options is {} (pass nothing on to serializer) serialize - serialize reference $serialized = $obj->serialize({a => [1,2,3],b => 5}); Serializes the reference specified. Will compress if compress is a true value. Will encrypt if secret is defined. deserialize - deserialize reference $deserialized = $obj->deserialize($serialized); Reverses the process of serialization and returns a copy of the original serialized reference. freeze - synonym for serialize $serialized = $obj->freeze({a => [1,2,3],b => 5}); thaw - synonym for deserialize $deserialized = $obj->thaw($serialized); raw_serialize - serialize reference in raw form $serialized = $obj->raw_serialize({a => [1,2,3],b => 5}); This is a straight pass through to the underlying serializer, nothing else is done. (no encoding, encryption, compression, etc) raw_deserialize - deserialize reference in raw form $deserialized = $obj->raw_deserialize($serialized); This is a straight pass through to the underlying serializer, nothing else is done. (no encoding, encryption, compression, etc) secret - specify secret for use with encryption $obj->secret(mysecret); Changes setting of secret for the Data::Serializer object. Can also be set in the constructor. If specified than the object will utilize encryption. portable - encodes/decodes serialized data Uses encoding method to ascii armor serialized data Aids in the portability of serialized data. compress - compression of data Compresses serialized data. Default is not to use it. Will compress if set to a true value $obj->compress(1); serializer - change the serializer Currently have 8 supported serializers: Storable, FreezeThaw, Data::Denter, Config::General, YAML, PHP::Serialization, XML::Dumper, and Data::Dumper. Default is to use Data::Dumper. Each serializer has its own caveats about usage especially when dealing with cyclical data structures or CODE references. Please see the appropriate documentation in those modules for further information. cipher - change the cipher method Utilizes Crypt::CBC and can support any cipher method that it supports. digester - change digesting method Uses Digest so can support any digesting method that it supports. Digesting function is used internally by the encryption routine as part of data verification. compressor - changes compresing module This method is included for possible future inclusion of alternate compression method Currently Compress::Zlib is the only supported compressor. encoding - change encoding method Encodes data structure in ascii friendly manner. Currently the only valid options are hex, or b64. The b64 option uses Base64 encoding provided by MIME::Base64, but strips out newlines. serializer_token - add usage hint to data Data::Serializer prepends a token that identifies what was used to process its data. This is used internally to allow runtime determination of how to extract Serialized data. Disabling this feature is not recommended. options - pass options through to underlying serializer Currently is only supported by Config::General, and XML::Dumper. my $obj = Data::Serializer->new(serializer => Config::General, options => { -LowerCaseNames => 1, -UseApacheInclude => 1, -MergeDuplicateBlocks => 1, -AutoTrue => 1, -InterPolateVars => 1 }, ) or die "$!n"; or my $obj = Data::Serializer->new(serializer => XML::Dumper, options => { dtd => 1, } ) or die "$!n"; store - serialize data and write it to a file (or file handle) $obj->store({a => [1,2,3],b => 5},$file, [$mode, $perm]); or $obj->store({a => [1,2,3],b => 5},$fh); Serializes the reference specified using the serialize method and writes it out to the specified file or filehandle. If a file path is specified you may specify an optional mode and permission as the next two arguments. See IO::File for examples. Trips an exception if it is unable to write to the specified file. retrieve - read data from file (or file handle) and return it after deserialization my $ref = $obj->retrieve($file); or my $ref = $obj->retrieve($fh); Reads first line of supplied file or filehandle and returns it deserialized..

Requirements: No special requirements
Platforms: Linux
Keyword: Data Dataserializer Default File Libraries Programming Serialize Serialized Serialized Data Serializer Xml
Users rating: 0/10

License: Freeware Size: 25.6 KB
More Reviews or Write Review

Libraries  -  Template::Plugin::Data::HTMLDumper 0.10
Template::Plugin::Data::HTMLDumper is a template toolkit plugin interface to Data::HTMLDumper. SYNOPSIS [% USE Data.HTMLDumper %] [% Data.HTMLDumper.dump(myvar) %] A very simple Template Toolkit Plugin Interface to the Data::HTMLDumper...
2.05 KB  
Libraries  -  Data::Walker 1.05
Data::Walker is a tool for navigating through Perl data structures. SYNOPSIS Without any explicit objects: use Data::Walker; Data::Walker->cli( $data_structure ); Object-style invocation: use Data::Walker; my $w = new Data::Walker;...
20.48 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  -  Data::Validator::Item 0.75
Data::Validator::Item is a Factory Class to validate data items. This is an attempt to create an object which will permit semi-automatic verification of a data value. SYNOPSIS use Data::Validator::Item; my $item =...
11.26 KB  
Libraries  -  Data::Stag 0.10
Data::Stag is a Perl module with structured tags datastructures. SYNOPSIS # PROCEDURAL USAGE use Data::Stag qw(:all); $doc = stag_parse($file); @persons = stag_find($doc, "person"); foreach $p (@persons) { printf "%s, %s phone: %sn",...
440.32 KB  
Libraries  -  Data::CTable 1.03
Data::CTable is a Perl module that helps you read, write, manipulate tabular data. SYNOPSIS ## Read some data files in various tabular formats use Data::CTable; my $People = Data::CTable->new("people.merge.mac.txt"); my $Stats =...
153.6 KB  
Libraries  -  Data::Diff 0.01
Data::Diff is a data structure comparison module. SYNOPSIS use Data::Diff qw(diff); # simple procedural interface to raw difference output $out = diff( $a, $b ); # OO usage $diff = Data::Diff->new( $a, $b ); $new = $diff->apply();...
6.14 KB  
Libraries  -  Data::Dumper 2.121
Data::Dumper module contains stringified perl data structures, suitable for both printing and eval. SYNOPSIS use Data::Dumper; # simple procedural interface print Dumper($foo, $bar); # extended usage with names print...
31.74 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  
Libraries  -  App::Repository 0.964
App::Repository is a logical data access layer for the App::Context Framework, providing a uniform API to access data in databases, file systems, remote web sites, etc. This is the App-Repository distribution, adding the data access layer...
62.46 KB  
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 3.15.3
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