Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Data::DRef 1999.0206

    Download button

    No screenshots available
    Downloads: 287  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Matthew Simon Cavalletto | More programs
    Perl Artistic License / FREE
    July 25th, 2009, 02:10 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Data::DRef description

    Delimited-key access to complex data structures

    Data::DRef is a Perl module that provides a streamlined interface for accessing values within nested Perl data structures. These structures are generally networks of hashes and arrays, some of which may be blessed into various classes, containing a mix of simple scalar values and references to other items in the structure.

    The Data::DRef functions allow you to use delimited key strings to set and retrieve values at desired nodes within these structures. These functions are slower than direct variable access, but provide additional flexibility for high-level scripting and other late-binding behaviour. For example, a web-based application could use DRefs to simplify customization, allowing the user to refer to arguments processed by CGI.pm in fairly readable way, such as query.param.foo.

    A suite of utility functions, previous maintained in a separate Data::Collection module, performs a variety of operations across nested data structures. Because the Data::DRef abstraction layer is used, these functions should work equally well with arrays, hashes, or objects that provide their own key-value interface.

    SYNOPSIS

     use Data::DRef qw( :dref_access );
     my $hash = { 'items' => [ 'first' ] };
     print get_value_for_dref($hash, 'items.0');
     set_value_for_dref( $hash, 'items.1', 'second' );
     
     set_value_for_root_dref( 'myhash', $hash );
     print get_value_for_root_dref('myhash.items.0');

     use Data::DRef qw( :select );
     matching_keys($target, %filter_criteria) : $key or @keys
     matching_values($target, %filter_criteria) : $item or @items

     use Data::DRef qw( :index );
     index_by_drefs($target, @drefs) : $index
     unique_index_by_drefs($target, @drefs) : $index
     ordered_index_by_drefs( $target, $index_dref ) : $entry_ary
     
     use Data::DRef qw( :leaf );
     leaf_drefs($target) : @drefs
     leaf_values( $target ) : @values
     leaf_drefs_and_values( $target ) : %dref_value_pairs



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    delimited-key access | complex data structures | Perl module | delimited-key | access | complex

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM