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 29.545.816 Times

Data::Diver 1.0101

  Date Added: April 23, 2010  |  Visits: 540


Report Broken Link
Printer Friendly Version

Product Homepage
Download (71 downloads)

Data::Diver is a simple, ad-hoc access to elements of deeply nested structures. SUMMARY Data::Diver provides the Dive() and DiveVal() functions for ad-hoc access to elements of deeply nested data structures, and the DiveRef(), DiveError(), DiveClear(), and DiveDie() support functions. SYNOPSIS use Data::Diver qw( Dive DiveRef DiveError ); my $root= { top => [ { first => 1 }, { second => { key => [ 0, 1, 2, { three => { exists => yes, }, }, ], }, }, ], }; # Sets $value to yes # ( $root->{top}[1]{second}{key}[3]{three}{exists} ): my $value= Dive( $root, qw( top 1 second key 3 three exists ) ); # Sets $value to undef() because "missing" doesnt exist: $value= Dive( $root, qw( top 1 second key 3 three missing ) ); # Sets $value to undef() because # $root->{top}[1]{second}{key}[4] is off the end of the array: $value= Dive( $root, qw( top 1 second key 4 ... ) ); # Sets $value to undef() because # $root->{top}[1]{second}{key}[-5] would be a fatal error: $value= Dive( $root, qw( top 1 second key -5 ... ) ); # Sets $ref to $root->{top}[9]{new}{sub} (which grows # @{ $root->{top} } and autovifies two anonymous hashes): my $ref= DiveRef( $root, qw( top 9 new sub ) ); # die()s because "other" isnt a valid number: $ref= DiveRef( $root, qw( top other ... ) ); # Does: $root->{num}{1}{2}= 3; # (Autovivifies hashes despite the numeric keys.) DiveVal( $root, ( qw( num 1 2 ) ) ) = 3; # Same thing: ${ DiveRef( $root, num, 1, 2 ) } = 3; # Retrieves above value, $value= 3: $value= DiveVal( $root, num, 1, 2 ); # Same thing: $value= ${ DiveRef( $root, ( qw( num 1 2 ) ) ) }; # Tries to do $root->{top}{1} and dies # because $root->{top} is an array reference: DiveRef( $root, top, 1 ); # To only autovivify at the last step: $ref= DiveRef( Dive( $root, qw( top 1 second key 3 three ) ), missing ); if( $ref ) { $$ref= me too } else { my( $nestedRef, $svKey, $errDesc )= DiveError(); die "Couldnt dereference $nestedRef via $$svKey: $errDescn"; }.

Requirements: No special requirements
Platforms: Linux
Keyword: Datadiver Diveerror Diveref Diveval Libraries Programming Qw Root Second Top Value
Users rating: 0/10

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

Libraries  -  XML::Bare 0.11
XML::Bare is a minimal XML parser implemented via a C state engine. SYNOPSIS use XML::Bare; my $xml = new XML::Bare( text => Bob ); # Parse the xml into a hash tree my $root = $xml->parse(); # Print the content of the...
10.24 KB  
Libraries  -  Regexp::Parser::Handlers 0.20
Regexp::Parser::Handlers is a Perl module with handlers for Perl 5 regexes. This module holds the init() method for the Regexp::Parser class, which installs all the handlers for standard Perl 5 regexes. This documentation contains a sub-classing...
40.96 KB  
Libraries  -  SOAP::Data 0.69
SOAP::Data is a Perl class that provides the means by which to explicitly manipulate and control all aspects of the way in which Perl data gets expressed as SOAP data entities. The SOAP::Data class provides the means by which to explicitly...
235.52 KB  
Programming  -  DL/SQL 1.0.1
DL/SQL is declarative, turing-complete programming language based on top of SQL database. The main idea is to store both program and data in one SQL table and make all the computations in it. The current version of interpreter written in PHP...
21.5 KB  
Libraries  -  Pogo 0.10
Pogo is a Perl interface for GOODS. SYNOPSIS use Pogo; $pogo = new Pogo sample.cfg; # connect to a database $root = $pogo->root_tie; # get a reference to root hash in the database $root->{key1} = "string"; # store a string into the...
12.29 KB  
Programming  -  Sh 0.8.0 RC1
Sh is a programming language built on top of C++. It can be used to write shaders that run on top of modern graphics processing units (GPUs), or write stream programs that run on GPUs or CPUs. Sh project is implemented as a C++ library, and...
378.88 KB  
Programming  -  Pygone 0.1
Pygone is to be a programming language built on top of Python, aimed to be a ridiculously high level programming language, allowing for it to be used to introduce people to programming.
20.48 KB  
Desktop Utilities  -  JD4X 0.6
JD4X project is a basic GUI Windowing Environment developed to support the Java Programming Language based on top of the X Window system. It was developed with the intention of providing a Java environment that allows Java programmers to build and...
17 MB  
Libraries  -  Bio::Root::Object 1.4
Bio::Root::Object is a core Perl 5 object. SYNOPSIS # Use this module as the root of your inheritance tree. Object Creation require Bio::Root::Object; $dad = new Bio::Root::Object(); $son = new Bio::Root::Object(-name => Junior, -parent...
4.7 MB  
Libraries  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB