data
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4871

Data Crow 3.4.13
Data Crow is an excellent and must-have product which offers you the ultimate media cataloger and media organizer. more>> <<less
Added: 2009-07-26 License: GPL Price: FREE
79 downloads
Data::SimplePassword 0.02
Data::SimplePassword provides a simple random password generator. more>>
Data::SimplePassword provides a simple random password generator.
SYNOPSIS
use Data::SimplePassword;
my $sp = Data::SimplePassword->new;
$sp->chars( 0..9, a..z, A..Z ); # optional
my $password = $sp->make_password( 8 ); # length
Its a very easy-to-use but a bit strong random password generator.
<<lessSYNOPSIS
use Data::SimplePassword;
my $sp = Data::SimplePassword->new;
$sp->chars( 0..9, a..z, A..Z ); # optional
my $password = $sp->make_password( 8 ); # length
Its a very easy-to-use but a bit strong random password generator.
Download (0.003MB)
Added: 2007-03-31 License: Perl Artistic License Price:
938 downloads
Google::Adwords::Data 0.6.0
Google::Adwords::Data is base class for the Data modules. more>>
Google::Adwords::Data is base class for the Data modules.
This module is not supposed to be used directly. Use the child data modules.
<<lessThis module is not supposed to be used directly. Use the child data modules.
Download (0.041MB)
Added: 2006-11-28 License: Perl Artistic License Price:
1060 downloads
Data::ENAML 0.03
Data::ENAML is a Perl extension for ENAML data representation. more>>
Data::ENAML is a Perl extension for ENAML data representation.
SYNOPSIS
use Data::ENAML qw (serialize deserialize);
print serialize(login => {nick => Schop,
email => ariel@atheist.org.il,
tagline => If I had no modem I would not lose Regina});
$struct = deserialize(bad-nick: {nick: "c00l dewd" text: "spaces not allowed"});
ENAML stands for ENAML is Not A Markup Language. (And as we all know, Gnu is Not UNIX, Pine Is Not Email, Wine Is Not Emulator, Lame Aint Mp3 Encoder and so on).
ENAML was defined by Robey Pointer for use in Say2, check http://www.lag.net/say2.
<<lessSYNOPSIS
use Data::ENAML qw (serialize deserialize);
print serialize(login => {nick => Schop,
email => ariel@atheist.org.il,
tagline => If I had no modem I would not lose Regina});
$struct = deserialize(bad-nick: {nick: "c00l dewd" text: "spaces not allowed"});
ENAML stands for ENAML is Not A Markup Language. (And as we all know, Gnu is Not UNIX, Pine Is Not Email, Wine Is Not Emulator, Lame Aint Mp3 Encoder and so on).
ENAML was defined by Robey Pointer for use in Say2, check http://www.lag.net/say2.
Download (0.004MB)
Added: 2006-11-15 License: Perl Artistic License Price:
1073 downloads
Data::TreeDumper 0.33
Data::TreeDumper is an improved replacement for Data::Dumper. more>>
Data::TreeDumper is an improved replacement for Data::Dumper. Powerful filtering capability.
SYNOPSIS
use Data::TreeDumper ;
my $sub = sub {} ;
my $s =
{
A =>
{
a =>
{
}
, bbbbbb => $sub
, c123 => $sub
, d => $sub
}
, C =>
{
b =>
{
a =>
{
a =>
{
}
, b => sub
{
}
, c => 42
}
}
}
, ARRAY => [qw(elment_1 element_2 element_3)]
} ;
#-------------------------------------------------------------------
# package setup data
#-------------------------------------------------------------------
$Data::TreeDumper::Useascii = 0 ;
$Data::TreeDumper::Maxdepth = 2 ;
print DumpTree($s, title) ;
print DumpTree($s, title, MAX_DEPTH => 1) ;
print DumpTrees
(
[$s, "title", MAX_DEPTH => 1]
, [$s2, "other_title", DISPLAY_ADDRESS => 0]
, USE_ASCII => 1
, MAX_DEPTH => 5
) ;
Output:
title:
|- A [H1]
| |- a [H2]
| |- bbbbbb = CODE(0x8139fa0) [C3]
| |- c123 [C4 -> C3]
| `- d [R5]
| `- REF(0x8139fb8) [R5 -> C3]
|- ARRAY [A6]
| |- 0 [S7] = elment_1
| |- 1 [S8] = element_2
| `- 2 [S9] = element_3
`- C [H10]
`- b [H11]
`- a [H12]
|- a [H13]
|- b = CODE(0x81ab130) [C14]
`- c [S15] = 42
<<lessSYNOPSIS
use Data::TreeDumper ;
my $sub = sub {} ;
my $s =
{
A =>
{
a =>
{
}
, bbbbbb => $sub
, c123 => $sub
, d => $sub
}
, C =>
{
b =>
{
a =>
{
a =>
{
}
, b => sub
{
}
, c => 42
}
}
}
, ARRAY => [qw(elment_1 element_2 element_3)]
} ;
#-------------------------------------------------------------------
# package setup data
#-------------------------------------------------------------------
$Data::TreeDumper::Useascii = 0 ;
$Data::TreeDumper::Maxdepth = 2 ;
print DumpTree($s, title) ;
print DumpTree($s, title, MAX_DEPTH => 1) ;
print DumpTrees
(
[$s, "title", MAX_DEPTH => 1]
, [$s2, "other_title", DISPLAY_ADDRESS => 0]
, USE_ASCII => 1
, MAX_DEPTH => 5
) ;
Output:
title:
|- A [H1]
| |- a [H2]
| |- bbbbbb = CODE(0x8139fa0) [C3]
| |- c123 [C4 -> C3]
| `- d [R5]
| `- REF(0x8139fb8) [R5 -> C3]
|- ARRAY [A6]
| |- 0 [S7] = elment_1
| |- 1 [S8] = element_2
| `- 2 [S9] = element_3
`- C [H10]
`- b [H11]
`- a [H12]
|- a [H13]
|- b = CODE(0x81ab130) [C14]
`- c [S15] = 42
Download (0.026MB)
Added: 2007-07-06 License: Perl Artistic License Price:
840 downloads
Data.FormValidator 0.04
Data.FormValidators aim is to bring all the benefits of the perl module Data::FormValidator over to javascript. more>>
Data.FormValidators aim is to bring all the benefits of the perl module Data::FormValidator over to javascript, using the same input profiles (they can be dumped into javascript objects using the perl module Data::JavaScript.
Data.FormValidator library lets you define profiles which declare the required and optional fields and any constraints they might have.
The results are provided as an object which makes it easy to handle missing and invalid results, return error messages about which constraints failed, or process the resulting valid data.
IMPORTANT NOTE: JavaScript form validation is NOT a replacement for data validation in your backend scripts. This is the primary reason this module was written... so that it would be easy to share the same validation profile for both the frontend (via Data.FormValidator.js) and backend (via Data::FormValidator.pm).
Enhancements:
- A problem where some functions were not terminated by a semi-colon, so JavaScript compactors would end up creating broken code was fixed.
<<lessData.FormValidator library lets you define profiles which declare the required and optional fields and any constraints they might have.
The results are provided as an object which makes it easy to handle missing and invalid results, return error messages about which constraints failed, or process the resulting valid data.
IMPORTANT NOTE: JavaScript form validation is NOT a replacement for data validation in your backend scripts. This is the primary reason this module was written... so that it would be easy to share the same validation profile for both the frontend (via Data.FormValidator.js) and backend (via Data::FormValidator.pm).
Enhancements:
- A problem where some functions were not terminated by a semi-colon, so JavaScript compactors would end up creating broken code was fixed.
Download (0.047MB)
Added: 2006-01-20 License: GPL (GNU General Public License) Price:
1372 downloads
Data::ICal 0.11
Data::ICal is a Perl module that generates iCalendar (RFC 2445) calendar files. more>>
Data::ICal is a Perl module that generates iCalendar (RFC 2445) calendar files.
SYNOPSIS
use Data::ICal;
my $calendar = Data::ICal->new();
my $vtodo = Data::ICal::Entry::Todo->new();
$vtodo->add_properties(
# ... see Data::ICal::Entry::Todo documentation
);
# ... or
$calendar = Data::ICal->new(filename => foo.ics); # parse existing file
$calendar = Data::ICal->new(data => BEGIN:VCALENDAR...); # parse existing file
$calendar->add_entry($vtodo);
print $calendar->as_string;
# Or, if youre printing to something you want google to read:
print $calendar->as_string(fold => 0);
A Data::ICal object represents a VCALENDAR object as defined in the iCalendar protocol (RFC 2445, MIME type "text/calendar"), as implemented in many popular calendaring programs such as Apples iCal.
Each Data::ICal object is a collection of "entries", which are objects of a subclass of Data::ICal::Entry. The types of entries defined by iCalendar (which refers to them as "components") include events, to-do items, journal entries, free/busy time indicators, and time zone descriptors; in addition, events and to-do items can contain alarm entries. (Currently, Data::ICal only implements to-do items and events.)
Data::ICal is a subclass of Data::ICal::Entry; see its manpage for more methods applicable to Data::ICal.
<<lessSYNOPSIS
use Data::ICal;
my $calendar = Data::ICal->new();
my $vtodo = Data::ICal::Entry::Todo->new();
$vtodo->add_properties(
# ... see Data::ICal::Entry::Todo documentation
);
# ... or
$calendar = Data::ICal->new(filename => foo.ics); # parse existing file
$calendar = Data::ICal->new(data => BEGIN:VCALENDAR...); # parse existing file
$calendar->add_entry($vtodo);
print $calendar->as_string;
# Or, if youre printing to something you want google to read:
print $calendar->as_string(fold => 0);
A Data::ICal object represents a VCALENDAR object as defined in the iCalendar protocol (RFC 2445, MIME type "text/calendar"), as implemented in many popular calendaring programs such as Apples iCal.
Each Data::ICal object is a collection of "entries", which are objects of a subclass of Data::ICal::Entry. The types of entries defined by iCalendar (which refers to them as "components") include events, to-do items, journal entries, free/busy time indicators, and time zone descriptors; in addition, events and to-do items can contain alarm entries. (Currently, Data::ICal only implements to-do items and events.)
Data::ICal is a subclass of Data::ICal::Entry; see its manpage for more methods applicable to Data::ICal.
Download (0.10MB)
Added: 2006-12-01 License: Perl Artistic License Price:
1059 downloads
Data::PropertyList 1998.1217
Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings. more>>
Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings.
SYNOPSIS
use Data::PropertyList qw(astext fromtext);
$hash_ref = { items => [ 7 .. 11 ], key => value };
$string = astext($hash_ref);
# ...
$hash_ref = fromtext($string);
print $hash_ref->{items}[0];
$array_ref = [ 1, { key => value }, Omega ];
$string = astext($array_ref);
# ...
$array_ref = fromtext($string, -array=>1 );
print $array_ref->[1]{key};
Data::Propertylist provides functions that turn data structures with nested references into NeXTs Property List text format and back again.
You may find this useful for saving and loading application information in text files, or perhaps for generating error messages while debugging.
astext( $reference ) : $propertylist_string;
Writes out a nested Perl data structure in NeXT property list format.
fromtext( $propertylist_string ) : $hash_ref
fromtext( $propertylist_string, -array=>1 ) : $array_ref
Reconstructs a Perl data structure of nested references and scalars from a NeXT property list. Use the -array flag if the string encodes an array rather than a hash.
<<lessSYNOPSIS
use Data::PropertyList qw(astext fromtext);
$hash_ref = { items => [ 7 .. 11 ], key => value };
$string = astext($hash_ref);
# ...
$hash_ref = fromtext($string);
print $hash_ref->{items}[0];
$array_ref = [ 1, { key => value }, Omega ];
$string = astext($array_ref);
# ...
$array_ref = fromtext($string, -array=>1 );
print $array_ref->[1]{key};
Data::Propertylist provides functions that turn data structures with nested references into NeXTs Property List text format and back again.
You may find this useful for saving and loading application information in text files, or perhaps for generating error messages while debugging.
astext( $reference ) : $propertylist_string;
Writes out a nested Perl data structure in NeXT property list format.
fromtext( $propertylist_string ) : $hash_ref
fromtext( $propertylist_string, -array=>1 ) : $array_ref
Reconstructs a Perl data structure of nested references and scalars from a NeXT property list. Use the -array flag if the string encodes an array rather than a hash.
Download (0.008MB)
Added: 2006-08-17 License: Perl Artistic License Price:
1163 downloads
Data::Str2Num 0.07
Data::Str2Num - int str to int; float str to float, else undef. more>>
Data::Str2Num - int str to int; float str to float, else undef.
SYNOPSIS
#####
# Subroutine interface
#
use Data::Str2Num qw(config str2float str2int str2integer);
$float = str2float($string, [@options]);
(@strings, @floats) = str2float(@strings, [@options]);
$integer = $secspack->str2int($string);
$integer = str2integer($string, [@options]);
(@strings, @integers) = str2int(@strings, [@options]);
#####
# Class, Object interface
#
# For class interface, use Data::SecsPack instead of $self
#
use Data::Str2Num;
$str2num = Data::Str2Num;
$str2num = new Data::Str2Num;
$float = $secspack->str2float($string, [@options]);
(@strings, @floats) = $secspack->str2float(@strings, [@options]);
$integer = $secspack->str2int($string);
$integer = $secspack->str2integer($string, [@options])
(@strings, @integers) = $secspack->str2int(@strings, [@options]);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
<<lessSYNOPSIS
#####
# Subroutine interface
#
use Data::Str2Num qw(config str2float str2int str2integer);
$float = str2float($string, [@options]);
(@strings, @floats) = str2float(@strings, [@options]);
$integer = $secspack->str2int($string);
$integer = str2integer($string, [@options]);
(@strings, @integers) = str2int(@strings, [@options]);
#####
# Class, Object interface
#
# For class interface, use Data::SecsPack instead of $self
#
use Data::Str2Num;
$str2num = Data::Str2Num;
$str2num = new Data::Str2Num;
$float = $secspack->str2float($string, [@options]);
(@strings, @floats) = $secspack->str2float(@strings, [@options]);
$integer = $secspack->str2int($string);
$integer = $secspack->str2integer($string, [@options])
(@strings, @integers) = $secspack->str2int(@strings, [@options]);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
Download (0.055MB)
Added: 2007-02-15 License: Perl Artistic License Price:
981 downloads
Data::Secs2 0.09
Data::Secs2 is a Perl module to pack, unpack, format, transform from Perl data SEMI E5-94 nested data. more>>
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 secs_elementify stringify textify transify);
@array = arrayify($ref, @options);
$old_value = config( $option );
$old_value = config( $option => $new_value);
$body = secs_elementify($format, $cells, @options);
@secs_obj = listify(@vars);
@secs_obj = neuterify($binary_secs, @options);
@vars = perlify(@secs_obj, @options);
$ref = perl_typify(@array, @options);
$ascii_secs = secsify( @secs_obj, @options);
$binary_secs = secsify( @secs_obj, type => binary);
$string = stringify(@arg, [@options]);
@secs_obj = transify($acsii_secs, @options);
#####
# Class, Object interface
#
# For class interface, use Data::Secs2 instead of $self
# use Data::Secs2;
#
$secs2 = Data::Secs2 # uses built-in config object
$secs2 = new Data::Secs2( @options );
@array = secs2->arrayify( $ref, @options );
$old_value = secs2->secs_config( $option);
$old_value = secs2->secs_config( $option => $new_value);
$body = secs2->secs_elementify($format, $cells, @options);
@secs_obj = secs2->listify(@vars, @options);
@secs_obj = secs2->neuterify($binary_secs, @options);
@vars = secs2->perlify(@secs_obj, @options);
$ref = secs2->perl_typify(@array, @options);
$ascii_secs = secs2->secsify( @secs_obj, @options);
$binary_secs = secs2->secsify( @secs_obj, type => binary);
$body = secs2->stringify( @arg );
@secs_obj = secs2->transify($acsii_secs, @options);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
<<lessSYNOPSIS
#####
# Subroutine interface
#
use Data::Secs2 qw(arrayify config listify neuterify numberify perlify
perl_typify secsify secs_elementify stringify textify transify);
@array = arrayify($ref, @options);
$old_value = config( $option );
$old_value = config( $option => $new_value);
$body = secs_elementify($format, $cells, @options);
@secs_obj = listify(@vars);
@secs_obj = neuterify($binary_secs, @options);
@vars = perlify(@secs_obj, @options);
$ref = perl_typify(@array, @options);
$ascii_secs = secsify( @secs_obj, @options);
$binary_secs = secsify( @secs_obj, type => binary);
$string = stringify(@arg, [@options]);
@secs_obj = transify($acsii_secs, @options);
#####
# Class, Object interface
#
# For class interface, use Data::Secs2 instead of $self
# use Data::Secs2;
#
$secs2 = Data::Secs2 # uses built-in config object
$secs2 = new Data::Secs2( @options );
@array = secs2->arrayify( $ref, @options );
$old_value = secs2->secs_config( $option);
$old_value = secs2->secs_config( $option => $new_value);
$body = secs2->secs_elementify($format, $cells, @options);
@secs_obj = secs2->listify(@vars, @options);
@secs_obj = secs2->neuterify($binary_secs, @options);
@vars = secs2->perlify(@secs_obj, @options);
$ref = secs2->perl_typify(@array, @options);
$ascii_secs = secs2->secsify( @secs_obj, @options);
$binary_secs = secs2->secsify( @secs_obj, type => binary);
$body = secs2->stringify( @arg );
@secs_obj = secs2->transify($acsii_secs, @options);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
Download (0.096MB)
Added: 2007-02-15 License: Perl Artistic License Price:
981 downloads
Data::CGIForm 0.4
Data::CGIForm is a Perl module with form data interface. more>>
Data::CGIForm is a Perl module with form data interface.
Data::CGIForm is yet another way to parse and handle CGI form data. The main motivation behind this module was a simple specification based validator that could handle multiple values.
You probably dont want to use this module. CGI::Validate is a much more feature complete take on getting this sort of work done. You may then ask why this is on the CPAN, I ask that of myself from time to time....
SYNOPSIS
my %spec = (
username => qr/^([a-z0-9]+)$/,
password => {
regexp => qr/^([a-z0-9+])$/,
filter => [qw(strip_leading_ws, strip_trailing_ws)],
},
email => {
regexp => qr/^([a-z0-9@.]+)$/,
filter => &qualify_domain,
optional => 1,
errors => {
empty => You didnt enter an email address.,
invalid => Bad [% key %]: "[% value %]",
},
extra_test => &check_email_addr,
},
email2 => {
equal_to => email,
errors => {
unequal => Both email addresses must be the same.,
},
},
);
my $r = $ENV{MOD_PERL} ? Apache::Request->instance : CGI->new;
my $form = Data::CGIForm->new(datasource => $r, spec => %spec);
my @params = $form->params;
foreach $param (@params) {
next unless my $error_string = $form->error($param);
print STDERR $error_string;
}
if ($form->error(username)) {
handle_error($form->username, $form->error(username));
}
my $email = $form->param(email);
my $password = $form->password;
<<lessData::CGIForm is yet another way to parse and handle CGI form data. The main motivation behind this module was a simple specification based validator that could handle multiple values.
You probably dont want to use this module. CGI::Validate is a much more feature complete take on getting this sort of work done. You may then ask why this is on the CPAN, I ask that of myself from time to time....
SYNOPSIS
my %spec = (
username => qr/^([a-z0-9]+)$/,
password => {
regexp => qr/^([a-z0-9+])$/,
filter => [qw(strip_leading_ws, strip_trailing_ws)],
},
email => {
regexp => qr/^([a-z0-9@.]+)$/,
filter => &qualify_domain,
optional => 1,
errors => {
empty => You didnt enter an email address.,
invalid => Bad [% key %]: "[% value %]",
},
extra_test => &check_email_addr,
},
email2 => {
equal_to => email,
errors => {
unequal => Both email addresses must be the same.,
},
},
);
my $r = $ENV{MOD_PERL} ? Apache::Request->instance : CGI->new;
my $form = Data::CGIForm->new(datasource => $r, spec => %spec);
my @params = $form->params;
foreach $param (@params) {
next unless my $error_string = $form->error($param);
print STDERR $error_string;
}
if ($form->error(username)) {
handle_error($form->username, $form->error(username));
}
my $email = $form->param(email);
my $password = $form->password;
Download (0.012MB)
Added: 2006-10-04 License: Perl Artistic License Price:
1115 downloads
Data::Serializer 0.41
Data::Serializer package contains modules that serialize data structures. more>>
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.
<<lessSYNOPSIS
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.
Download (0.025MB)
Added: 2007-07-12 License: Perl Artistic License Price:
834 downloads
Data::Startup 0.04
Data::Startup is a Perl module with startup options class, override, config methods. more>>
SYNOPSIS
######
# Subroutine interface
#
use Data::Startup qw(config override);
$options = override(%default_options, @option_list );
$options = override(%default_options, @option_list );
$options = override(%default_options, %option_list );
@options_list = config(%options );
($key, $old_value) = config(%options, $key);
($key, $old_value) = config(%options, $key => $new_value );
($key, $old_value) = config(%options, $key => $new_value );
@old_options_list = config(%options, @option_list);
@old_options_list = config(%options, @option_list);
@old_options_list = config(%options, %option_list);
######
# Object interface
#
use Data::Startup
$startup_options = $class->Data::Startup::new( @option_list );
$startup_options = $class->Data::Startup::new( @option_list );
$startup_options = $class->Data::Startup::new( %option_list );
$options = $startup_options->override( @option_list );
$options = $startup_options->override( @option_list );
$options = $startup_options->override( %option_list );
@options_list = $options->config( );
($key, $old_value) = $options->config($key);
($key, $old_value) = $options->config($key => $new_value );
($key, $old_value) = $options->config($key => $new_value );
@old_options_list = $options->config(@option_list);
@old_options_list = $options->config(@option_list);
@old_options_list = $options->config(%option_list);
# Note: May use [@option_list] instead of @option_list
# and {@option_list} instead of %option_list
Many times there is a group of subroutines that can be tailored by different situations with a few, say global variables. However, global variables pollute namespaces, become mangled when the functions are multi-threaded and probably have many other faults that it is not worth the time discovering.
As well documented in literature, object oriented programming do not have these faults. This program module class of objects provide the objectized options for a group of subroutines or encapsulated options by using the methods directly as in an option object.
The Data::Startup class provides a way to input options in very liberal manner of either
- arrays, reference to an array, or reference to hash to a
- reference to an array or reference to a hash
- reference to a hash
- referene to an array
- many other combos
without having to cut and paste specialize, tailored code into each subroutine/method.
<<less######
# Subroutine interface
#
use Data::Startup qw(config override);
$options = override(%default_options, @option_list );
$options = override(%default_options, @option_list );
$options = override(%default_options, %option_list );
@options_list = config(%options );
($key, $old_value) = config(%options, $key);
($key, $old_value) = config(%options, $key => $new_value );
($key, $old_value) = config(%options, $key => $new_value );
@old_options_list = config(%options, @option_list);
@old_options_list = config(%options, @option_list);
@old_options_list = config(%options, %option_list);
######
# Object interface
#
use Data::Startup
$startup_options = $class->Data::Startup::new( @option_list );
$startup_options = $class->Data::Startup::new( @option_list );
$startup_options = $class->Data::Startup::new( %option_list );
$options = $startup_options->override( @option_list );
$options = $startup_options->override( @option_list );
$options = $startup_options->override( %option_list );
@options_list = $options->config( );
($key, $old_value) = $options->config($key);
($key, $old_value) = $options->config($key => $new_value );
($key, $old_value) = $options->config($key => $new_value );
@old_options_list = $options->config(@option_list);
@old_options_list = $options->config(@option_list);
@old_options_list = $options->config(%option_list);
# Note: May use [@option_list] instead of @option_list
# and {@option_list} instead of %option_list
Many times there is a group of subroutines that can be tailored by different situations with a few, say global variables. However, global variables pollute namespaces, become mangled when the functions are multi-threaded and probably have many other faults that it is not worth the time discovering.
As well documented in literature, object oriented programming do not have these faults. This program module class of objects provide the objectized options for a group of subroutines or encapsulated options by using the methods directly as in an option object.
The Data::Startup class provides a way to input options in very liberal manner of either
- arrays, reference to an array, or reference to hash to a
- reference to an array or reference to a hash
- reference to a hash
- referene to an array
- many other combos
without having to cut and paste specialize, tailored code into each subroutine/method.
Download (0.073MB)
Added: 2007-02-15 License: Perl Artistic License Price:
982 downloads
Data::BenchmarkResults 0.01
Data::BenchmarkResults is a Perl extension for averaging and comparing multiple benchmark runs. more>>
Data::BenchmarkResults is a Perl extension for averaging and comparing multiple benchmark runs.
SYNOPSIS
use Data::BenchmarkResults;
$conditionA_results = new Data::BenchmarkResults;
$conditionB_results = new Data::BenchmarkResults;
#Load test result runs for the first condition
$conditionA_results->add_result_set("test1","run1",@data1);
$conditionA_results->add_result_set("test2","run1",@data2);
$conditionA_results->add_result_set("test1","run2",@data3);
$conditionA_results->add_result_set("test2","run2",@data4);
#Load test result runs for the second condition
$conditionB_results->add_result_set("test1","run1",@data5);
$conditionB_results->add_result_set("test2","run2",@data6);
$conditionB_results->add_result_set("test1","run1",@data7);
$conditionB_results->add_result_set("test2","run2",@data8);
#Average (mean average) the results of all the the runs of test1
# w/o tossing the highest and lowest values (replace the 0 with 1to
# toss the highest and lowest values
my $computed = $conditionA_results->process_result_set("test1","mean",0);
my $computed2 = $conditionB_results->process_result_set("test1","mean",0);
#OR process all of the tests at once (tossing the highest and lowest value) :
$conditionA_results->process_all_result_sets("mean",1);
$conditionB_results->process_all_result_sets("mean",1);
#Print out all of the processed test results
print "Condition A results.... nn"
$conditionA_results->print_calculated_sets;
print "Condition B results.... nn"
$conditionB_results->print_calculated_sets;
#Compare results of test1 of condition B against those with condition A
# as a percentage change from A to B
my $compared = $conditionB_results->compare_result_set($conditionA_results,"test1");
#OR compare all the processed test results from one condition to those of another
my $total_comparison = $conditionB_results->compare_all_result_sets($conditionA_results);
<<lessSYNOPSIS
use Data::BenchmarkResults;
$conditionA_results = new Data::BenchmarkResults;
$conditionB_results = new Data::BenchmarkResults;
#Load test result runs for the first condition
$conditionA_results->add_result_set("test1","run1",@data1);
$conditionA_results->add_result_set("test2","run1",@data2);
$conditionA_results->add_result_set("test1","run2",@data3);
$conditionA_results->add_result_set("test2","run2",@data4);
#Load test result runs for the second condition
$conditionB_results->add_result_set("test1","run1",@data5);
$conditionB_results->add_result_set("test2","run2",@data6);
$conditionB_results->add_result_set("test1","run1",@data7);
$conditionB_results->add_result_set("test2","run2",@data8);
#Average (mean average) the results of all the the runs of test1
# w/o tossing the highest and lowest values (replace the 0 with 1to
# toss the highest and lowest values
my $computed = $conditionA_results->process_result_set("test1","mean",0);
my $computed2 = $conditionB_results->process_result_set("test1","mean",0);
#OR process all of the tests at once (tossing the highest and lowest value) :
$conditionA_results->process_all_result_sets("mean",1);
$conditionB_results->process_all_result_sets("mean",1);
#Print out all of the processed test results
print "Condition A results.... nn"
$conditionA_results->print_calculated_sets;
print "Condition B results.... nn"
$conditionB_results->print_calculated_sets;
#Compare results of test1 of condition B against those with condition A
# as a percentage change from A to B
my $compared = $conditionB_results->compare_result_set($conditionA_results,"test1");
#OR compare all the processed test results from one condition to those of another
my $total_comparison = $conditionB_results->compare_all_result_sets($conditionA_results);
Download (0.009MB)
Added: 2007-08-16 License: Perl Artistic License Price:
799 downloads
Data::CTable 1.03
Data::CTable is a Perl module that helps you read, write, manipulate tabular data. more>>
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 = Data::CTable->new("stats.tabs.unix.txt");
## Clean stray whitespace in fields
$People->clean_ws();
$Stats ->clean_ws();
## Retrieve columns
my $First = $People->col(FirstName);
my $Last = $People->col(LastName );
## Calculate a new column based on two others
my $Full = [map {"$First->[$_] $Last->[$_]"} @{$People->all()}];
## Add new column to the table
$People->col(FullName => $Full);
## Another way to calculate a new column
$People->col(Key);
$People->calc(sub {no strict vars; $Key = "$Last,$First";});
## "Left join" records matching Stats:PersonID to People:Key
$Stats->join($People, PersonID => Key);
## Find certain records
$Stats->select_all();
$Stats->select(Department => sub {/Sale/i }); ## Sales depts
$Stats->omit (Department => sub {/Resale/i}); ## not Resales
$Stats->select(UsageIndex => sub {$_ > 20.0}); ## high usage
## Sort the found records
$Stats->sortspec(DeptNum , {SortType => Integer});
$Stats->sortspec(UsageIndex, {SortType => Number });
$Stats->sort([qw(DeptNum UsageIndex Last First)]);
## Make copy of table with only found/sorted data, in order
my $Report = $Stats->snapshot();
## Write an output file
$Report->write(_FileName => "Rept.txt", _LineEnding => "mac");
## Print a final progress message.
$Stats->progress("Done!");
## Dozens more methods and parameters available...
OVERVIEW
Data::CTable is a comprehensive utility for reading, writing, manipulating, cleaning and otherwise transforming tabular data. The distribution includes several illustrative subclasses and utility scripts.
A Columnar Table represents a table as a hash of data columns, making it easy to do data cleanup, formatting, searching, calculations, joins, or other complex operations.
The objects hash keys are the field names and the hash values hold the data columns (as array references).
Tables also store a "selection" -- a list of selected / sorted record numbers, and a "field list" -- an ordered list of all or some fields to be operated on. Select() and sort() methods manipulate the selection list. Later, you can optionally rewrite the table in memory or on disk to reflect changes in the selection list or field list.
Data::CTable reads and writes any tabular text file format including Merge, CSV, Tab-delimited, and variants. It transparently detects, reads, and preserves Unix, Mac, and/or DOS line endings and tab or comma field delimiters -- regardless of the runtime platform.
In addition to reading data files, CTable is a good way to gather, store, and operate on tabular data in memory, and to export data to delimited text files to be read by other programs or interactive productivity applications.
To achieve extremely fast data loading, CTable caches data file contents using the Storable module. This can be helpful in CGI environments or when operating on very large data files. CTable can read an entire cached table of about 120 megabytes into memory in about 10 seconds on an average mid-range computer.
For simple data-driven applications needing to store and quickly retrieve simple tabular data sets, CTable provides a credible alternative to DBM files or SQL.
For data hygiene applications, CTable forms the foundation for writing utility scripts or compilers to transfer data from external sources, such as FileMaker, Excel, Access, personal organizers, etc. into compiled or validated formats -- or even as a gateway to loading data into SQL databases or other destinations. You can easily write short, repeatable scripts in Perl to do reporting, error checking, analysis, or validation that would be hard to duplicate in less-flexible application environments.
The data representation is simple and open so you can directly access the data in the object if you feel like it -- or you can use accessors to request "clean" structures containing only the data or copies of it. Or you can build your own columns in memory and then when youre ready, turn them into a table object using the very flexible new() method.
The highly factored interface and implementation allow fine-grained subclassing so you can easily create useful lightweight subclasses. Several subclasses are included with the distribution.
Most defaults and parameters can be customized by subclassing, overridden at the instance level (avoiding the need to subclass too often), and further overridden via optional named-parameter arguments to most major method calls.
<<lessSYNOPSIS
## Read some data files in various tabular formats
use Data::CTable;
my $People = Data::CTable->new("people.merge.mac.txt");
my $Stats = Data::CTable->new("stats.tabs.unix.txt");
## Clean stray whitespace in fields
$People->clean_ws();
$Stats ->clean_ws();
## Retrieve columns
my $First = $People->col(FirstName);
my $Last = $People->col(LastName );
## Calculate a new column based on two others
my $Full = [map {"$First->[$_] $Last->[$_]"} @{$People->all()}];
## Add new column to the table
$People->col(FullName => $Full);
## Another way to calculate a new column
$People->col(Key);
$People->calc(sub {no strict vars; $Key = "$Last,$First";});
## "Left join" records matching Stats:PersonID to People:Key
$Stats->join($People, PersonID => Key);
## Find certain records
$Stats->select_all();
$Stats->select(Department => sub {/Sale/i }); ## Sales depts
$Stats->omit (Department => sub {/Resale/i}); ## not Resales
$Stats->select(UsageIndex => sub {$_ > 20.0}); ## high usage
## Sort the found records
$Stats->sortspec(DeptNum , {SortType => Integer});
$Stats->sortspec(UsageIndex, {SortType => Number });
$Stats->sort([qw(DeptNum UsageIndex Last First)]);
## Make copy of table with only found/sorted data, in order
my $Report = $Stats->snapshot();
## Write an output file
$Report->write(_FileName => "Rept.txt", _LineEnding => "mac");
## Print a final progress message.
$Stats->progress("Done!");
## Dozens more methods and parameters available...
OVERVIEW
Data::CTable is a comprehensive utility for reading, writing, manipulating, cleaning and otherwise transforming tabular data. The distribution includes several illustrative subclasses and utility scripts.
A Columnar Table represents a table as a hash of data columns, making it easy to do data cleanup, formatting, searching, calculations, joins, or other complex operations.
The objects hash keys are the field names and the hash values hold the data columns (as array references).
Tables also store a "selection" -- a list of selected / sorted record numbers, and a "field list" -- an ordered list of all or some fields to be operated on. Select() and sort() methods manipulate the selection list. Later, you can optionally rewrite the table in memory or on disk to reflect changes in the selection list or field list.
Data::CTable reads and writes any tabular text file format including Merge, CSV, Tab-delimited, and variants. It transparently detects, reads, and preserves Unix, Mac, and/or DOS line endings and tab or comma field delimiters -- regardless of the runtime platform.
In addition to reading data files, CTable is a good way to gather, store, and operate on tabular data in memory, and to export data to delimited text files to be read by other programs or interactive productivity applications.
To achieve extremely fast data loading, CTable caches data file contents using the Storable module. This can be helpful in CGI environments or when operating on very large data files. CTable can read an entire cached table of about 120 megabytes into memory in about 10 seconds on an average mid-range computer.
For simple data-driven applications needing to store and quickly retrieve simple tabular data sets, CTable provides a credible alternative to DBM files or SQL.
For data hygiene applications, CTable forms the foundation for writing utility scripts or compilers to transfer data from external sources, such as FileMaker, Excel, Access, personal organizers, etc. into compiled or validated formats -- or even as a gateway to loading data into SQL databases or other destinations. You can easily write short, repeatable scripts in Perl to do reporting, error checking, analysis, or validation that would be hard to duplicate in less-flexible application environments.
The data representation is simple and open so you can directly access the data in the object if you feel like it -- or you can use accessors to request "clean" structures containing only the data or copies of it. Or you can build your own columns in memory and then when youre ready, turn them into a table object using the very flexible new() method.
The highly factored interface and implementation allow fine-grained subclassing so you can easily create useful lightweight subclasses. Several subclasses are included with the distribution.
Most defaults and parameters can be customized by subclassing, overridden at the instance level (avoiding the need to subclass too often), and further overridden via optional named-parameter arguments to most major method calls.
Download (0.15MB)
Added: 2007-07-13 License: Perl Artistic License Price:
833 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above data search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed