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

Tie::ListKeyedHash 1.02

  Date Added: June 06, 2010  |  Visits: 597

Tie::ListKeyedHash

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 downloads)

Tie::ListKeyedHash is a system allowing the use of anonymous arrays as keys to a hash. SYNOPSIS use Tie::ListKeyedHash; [$X =] tie %hash, Tie::ListKeyedHash; my $live_key = [key,items,live]; $hash{$live_key} = Hello!; $hash{[key,trees,grow]} = Goodbye!; print $hash{[key,items,live]},"n"; delete $hash{$live_key}; my @list = keys %{$hash{[key]}}; print "@listn"; untie %hash ; Alternatively keys are accessible as: $hash{key,items,live} = Hello!; (a bare list/array for the key rather than using an anon list/array reference). But that slows down the accesses by around 10% and cannot be used for keys that conflict with the value of the $; special variable. Also usable via the object interface methods put, get,exists,delete,clear. The object interface is about 2x as fast as the tied interface. Tie::ListKeyedHash ties a hash so that you can use a reference to an array as the key of the hash. It otherwise behaves exactly like a normal hash (including all caveats about trying to use a key as both a hash reference and a scalar value). This frees you from needing to hardwire hash references in code or having to write tree traversal code to reach arbitrary points in a hash tree. Example: ######################## #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Tie::ListKeyedHash; my %example; tie (%example, Tie::ListKeyedHash); %example = ( a => { b0 => { c => value of c, d => value of d, e => { f => value of f, }, }, b1 => { g => value of g, }, }, h => r, ); my $b_key = [a,b0]; my $d_key = [@$b_key,d]; my $d = $example{$d_key}; print "d = $dn"; my $e_key = [@$b_key, e]; my $e = $example{$e_key}; print e = . Dumper ($e); my $f_key = [@$b_key, e,f]; my $f = $example{$f_key}; print "f = $fn"; my $h_key = [h]; my $h = $example{$h_key}; print "h = $hn"; ######################## The virtues of this particular way of accessing hash-of-hashes (HoH) vs bare hardwired derefererences or tree crawling are as follows: 1) As the number of levels in a HoH increases, the tied object asymptotically approaches the speed of hardwired hash dereferencing without the loss of flexibility penalty of having to hardwire the keys into code in advance. This gives an important property that it gets faster the deeper a HoH becomes as compared with the speed of software driven tree traveral. So you can build and access arbitrarily structured HoH and still access deeply buried elements in the tree quickly. 2) The format was designed to use memory efficiently. It takes only a few hundred extra bytes over the size of an untied HoH in memory or when serialized (via Data::Dumper or Storable for example) regardless of how deep the hash is. 3) A reference to an existing HoH can be passed into Tie::ListKeyedHash->new and all of the OO key lists access methods will "just work". Example: use Tie::ListKeyedHash; my %hash = ( a => { b => c } ); my $obj = Tie::ListKeyedHash->new(%hash); my $b_value = $obj->get([a,b]);. A freeware integrated WWW and FTP log reporting tool that include support for standard and combined access_log formats and generation of graphical reports. Written in perl.

Requirements: No special requirements
Platforms: Linux
Keyword: Example Hash Hoh Key Keys Libraries Listkeyedhash Programming Tielistkeyedhash Use Of Value Value Of
Users rating: 0/10

License: Freeware Size: 16.38 KB
TIE::LISTKEYEDHASH RELATED
Libraries  -  Tie::Hash::RegexKeys 1.2
Tie::Hash::RegexKeys will match hash keys using Regular Expressions. SYNOPSIS use Tie::Hash::RegexKeys; use Data::Dumper; my %h; tie %h, Tie::Hash::RegexKeys; my $a = .1.2.3.4.5.6.2; my $b = .1.2.3.4.5.7; my $c = .1.2.3.4.5.6.1; my...
3.07 KB  
Libraries  -  PAR::WebStart::PNLP 0.18
PAR::WebStart::PNLP is a Perl module that can parse pnlp files. SYNOPSIS my $file = hello.pnlp; my $obj = PAR::WebStart::PNLP->new(file => $file); my $cfg = $obj->parse(); This module is used to parse PNLP files, which are XML files whose...
23.55 KB  
Libraries  -  Adobe Source Libraries 1.0.29
The Adobe Source Libraries (ASL) are a collection of C++ libraries building foundation technology to allow the construction of commercial applications by assembling generic algorithms through declarative descriptions. Whats New in This Release:...
8.2 MB  
Clipboard Utilities  -  ReGen - KeyCode 1.3.0.0
The program lets you know the code of the key pressed. The application displays the coding keys, ASCII and brCode (the character code for the browser), and the immediate translation of the meaning of code in binary and hexadecimal numbering...
1.17 MB  
Programming  -  Portable Object Compiler 0.2.2
Portable Object Compiler project consists of a set of Objective-C class libraries and a precompiler (translator) that generates plain C code..
839.68 KB  
Security Tools  -  Hash Codes 1.62.780.7200
Hash Codes is a simple and easy to use application designed to enable users to hash data from keyboard, file or CD/DVD. This tool supports: Adler32, CRC32, CRC64, MD2, MD4, MD5, MD6, SHA-0, SHA-1, SHA-1-IME, SHA-224, SHA-256, SHA-384, SHA-512,...
 
Security Tools  -  Hash Codes x64 1.62.780.7200
Hash Codes is a simple and easy to use application designed to enable users to hash data from keyboard, file or CD/DVD. This tool supports: Adler32, CRC32, CRC64, MD2, MD4, MD5, MD6, SHA-0, SHA-1, SHA-1-IME, SHA-224, SHA-256, SHA-384, SHA-512,...
430 KB  
Programming  -  Eli: Translator Construction Made Easy 4.7.4
Eli is a programming environment that supports all phases of translator construction with extensive libraries implementing common tasks, yet handling arbitrary special cases. Output is the C subset of C++. Please use eli-project-users list for suppor
10.43 MB  
Communication  -  DTMF tones detection 1.0
A program that allows you to detect DTMF tones, generated for example pressing any key of your mobile, as it happens on automated phone service lines.You can record a tone using your microphone (one tone a time); the software will analyze it and...
276.48 KB  
Productivity  -  Email Faster 0.94
EmailFaster and TextFaster are two free applications with big keys. To type a letter you just swipe one of the big keys once. The keys are laid out like a familiar T9 cell phone keyboard. To type an 'a', you swipe the 'abc' key to the left. To...
819.2 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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 freedesktop.org, 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  -  wolfSSL 3.12.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...
2.73 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