Tie::TwoLevelHash

Tie::TwoLevelHash is a tied interface to multi-dimensional (Two-Level) hash files.
Download

Tie::TwoLevelHash Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kevin Meltzer
  • Publisher web site:
  • http://search.cpan.org/~sherzodr/Class-PObject-2.17/docs/Philosophy.pod

Tie::TwoLevelHash Tags


Tie::TwoLevelHash Description

Tie::TwoLevelHash is a tied interface to multi-dimensional (Two-Level) hash files. Tie::TwoLevelHash is a tied interface to multi-dimensional (Two-Level) hash files.SYNOPSIS # Tie to Hash-o-hashes use Tie::TwoLevelHash; tie (%hash, 'Tie::TwoLevelHash', $file, 'rw'); # Open in read/write mode $hash{PEOPLE} = {YOU => "me"}; # Set value YOU in hash PEOPLE withing hash %hash to "me" # Tie to hash within a Hash-o-hashes use Tie::TwoLevelHash: tie (%hash, 'Tie::TwoLevelHash', "$file, " 'rw'); # Open in read/write mode $hash{YOU} = "me"; # Set key YOU in hash (within HoH's) to "me" untie %hash; tie (%hash, 'Tie::TwoLevelHash', $file); # Defaults to read-only mode ... untie %hash;This is the Tie::TwoLevelHash module. It is a TIEHASH interface which lets you tie to a text file which is a multi-dimensional (two level) hash.To use it, tie a hash to a directory: tie(%hash, 'Tie::TwoLevelHash', $file, 'rw'); # Open in read/write modeIf you pass 'rw' as the third parameter, you'll be in read/write mode, and any changes you make to the hash will create or modify the file. If you don't open in read/write mode you'll be in read-only mode, and any changes you make to the hash won't have any effect in the given file. It's actually useless to tie to the file in read mode and make write calls to it, or the hash you are tying to it. If you do, it may croak, depending on what you are trying. If you want to grab values and play with them, do that in your script, and get the values out of the hash name you are tying with, so you can write to a local hash, and not affect, or try to affect the hash you are tying with. Requirements: · Perl


Tie::TwoLevelHash Related Software