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

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

Serving Software Downloads in 956 Categories, Downloaded 50.239.861 Times

Acme::Hyperindex 0.12

  Date Added: September 18, 2010  |  Visits: 1.094

Acme::Hyperindex

Report Broken Link
Printer Friendly Version


Product Homepage
Download (97 downloads)



Acme::Hyperindex is a Perl module to look deep into structures using a list of indexes. SYNOPSIS use strict; use Acme::Hyperindex; my @struct = ( { j_psi => [qw( eta_prime phi kaon )] }, { j_psi => [qw( selectron down tau_sneutrino )] }, { j_psi => [qw( upsilon gluino photino )] } ); print @struct[[ 2, j_psi, 1 ]], "n"; ### Prints gluino my $row = @struct[[ 1, j_psi ]]; ### Row contains [qw( selectron down tau_sneutrino )] When you use dynamic datastructures, the perl index syntax may not be felxible enough. A little examle: my @struct = ( { pion => [ [qw(strange j_psi positron)], [qw(down_squark electron gluino)], ], w_plus_wino => [ [qw(neutralino tau kaon)], [qw(charm_squark photino strange_squark)] ], }, ); Now to get to the kaon particle, normally we use: my $particle = $struct[0]->{w_plus_wino}->[2]; -- or better -- my $particle = $struct[0]{w_plus_wino}[2]; But what if you dont know how deep your datastructure is at compile time? Course this is doable: my $particle = @struct; $particle = $particle->[$_] for qw(0 pion 2); Two problems here: Perl will tell you Not an ARRAY reference once we try to index in the hash on pion with this array indexing syntax. Its damn ugly and looks complicated. So Acme::Hyperindex lets you index arbitrary deep into data structures: my $particle = @struct[[ 0, pion, 2 ]]; -- or even -- my $particle = @struct[[ @indexes ]]; -- or -- my $particle = @struct[[ get_index() ]]; -- or -- my $particle = @struct[[ $particleindexes[[ 3, 42 ]] ]]; Acme::Hyperindex now also lets you index on scalars, arrays and hashes: $struct[[ ... ]]; @struct[[ ... ]]; %struct[[ ... ]]; And lists ary auto-derefed in list context: my $struct = [ [qw(a b c)], [qw(d e f)] ]; my $foo = $struct[[ 0 ]]; # $foo contains a ref to qw(a b c) my @foo = $struct[[ 0 ]]; # @foo contains qw(a b c).

Requirements: No special requirements
Platforms: Linux
Keyword: Acmehyperindex Libraries List Of Particle Perl Perl Module Programming Psi Qw Struct Using A
Users rating: 0/10

License: Freeware Size: 4.1 KB
USER REVIEWS
More Reviews or Write Review


ACME::HYPERINDEX RELATED
Libraries  -  File::DirCompare 0.3
File::DirCompare is a Perl module to compare two directories using callbacks. SYNOPSIS use File::DirCompare; # Simple diff -r --brief replacement use File::Basename; File::DirCompare->compare($dir1, $dir2, sub { my ($a, $b) = @_; if (!...
8.19 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Convert::Wiki::Node::Item 0.05
Convert::Wiki::Node::Item is a Perl module that represents an item in a list (aka or *). SYNOPSIS use Convert::Wiki::Node::Item; my $para = Convert::Wiki::Node->new( txt => Foo is a foobar., type => item ); print $para->as_wiki(); #...
19.46 KB  
Libraries  -  Parse::Nibbler 1.10
Parse::Nibbler is Perl module to parse huge files using grammars written in pure perl. Create a parser object using the ->new method. This method is provided by the Parse::Nibbler module and should not be overridden. The main functionality of...
33.79 KB  
Libraries  -  Jifty::Manual::Tutorial 0.60912
Jifty::Manual::Tutorial is a Perl module for Zero to Jifty in a Jiffy. This tutorial should give you everything you need to build your first application with Jifty. HOW TO The requirements Heres what you need to have installed -- at least...
532.48 KB  
Libraries  -  WebService::TestSystem 0.06
WebService::TestSystem is a Perl module with Web service for implementing a distributed testing system. my $testsys = new WebService::TestSystem; # Getting a list of tests foreach my $test (@{$testsys->get_tests()}) { print "$test->{id}...
39.94 KB  
Libraries  -  readcdda 1.003
readcdda is a Perl module that reads digital audio from a CD. SYNOPSIS readcdda [OPTION]... This is a program to read (or "rip") CD digital audio from a CD and output the PCM data. Typically this is an initial stage in encoding data to MP3...
9.22 KB  
Libraries  -  Net::DHCP::Packet 0.66
Net::DHCP::Packet is a Perl module with object methods to create a DHCP packet. SYNOPSIS use Net::DHCP::Packet; my $p = new Net::DHCP::Packet->new( Chaddr => 000BCDEF, Xid => 0x9F0FD, Ciaddr => 0.0.0.0, Siaddr => 0.0.0.0, Hops => 0);...
21.5 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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 4.0.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...
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