Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

moosex::attributehelpers::methodprovider::hash(3pm) [debian man page]

MooseX::AttributeHelpers::MethodProvider::Hash(3pm)	User Contributed Perl Documentation    MooseX::AttributeHelpers::MethodProvider::Hash(3pm)

NAME
MooseX::AttributeHelpers::MethodProvider::Hash - method generator for MooseX::AttributeHelpers::Collection::Hash DESCRIPTION
This is a role which provides the method generators for MooseX::AttributeHelpers::Collection::Hash. This role is composed from the MooseX::AttributeHelpers::Collection::ImmutableHash role. METHODS
meta PROVIDED METHODS
count Returns the number of elements in the hash. delete Removes the element with the given key defined Returns true if the value of a given key is defined empty If the list is populated, returns true. Otherwise, returns false. clear Unsets the hash entirely. exists Returns true if the given key is present in the hash get Returns an element of the hash by its key. keys Returns the list of keys in the hash. set Sets the element in the hash at the given key to the given value. values Returns the list of values in the hash. kv Returns the key, value pairs in the hash accessor If passed one argument, returns the value of the requested key. If passed two arguments, sets the value of the requested key. BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2007-2009 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-01-02 MooseX::AttributeHelpers::MethodProvider::Hash(3pm)

Check Out this Related Man Page

MooseX::AttributeHelpers::Collection::ImmutableHash(3pm)User Contributed Perl DocumentatioMooseX::AttributeHelpers::Collection::ImmutableHash(3pm)

NAME
MooseX::AttributeHelpers::Collection::ImmutableHash - immutable HashRef attribute type SYNOPSIS
package Stuff; use Moose; use MooseX::AttributeHelpers; has 'options' => ( metaclass => 'Collection::ImmutableHash', is => 'ro', isa => 'HashRef[Str]', default => sub { {} }, provides => { 'get' => 'get_option', 'empty' => 'has_options', 'keys' => 'get_option_list', } ); DESCRIPTION
This module provides a immutable HashRef attribute which provides a number of hash-line operations. See MooseX::AttributeHelpers::MethodProvider::ImmutableHash for more details. METHODS
meta method_provider has_method_provider helper_type BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2007-2009 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-01-02 MooseX::AttributeHelpers::Collection::ImmutableHash(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

Creating a Hash Table

Dear Friends, I want to create a hash table using the standard Glib header (if possible) so that I can store a structure and keep the hash key(search key) based on a string. Any example code would be great since I am not able to get the main idea. best regards Skull (4 Replies)
Discussion started by: callmetheskull
4 Replies

2. Shell Programming and Scripting

perl adding items to a hash

how would you go about taking a user's input and adding it to a hash? i'd also like it to permanently add the input to the hash. not just in the ram, add it into the script! :eek: (17 Replies)
Discussion started by: andrew2325
17 Replies

3. Shell Programming and Scripting

Read csv into Hash array?

Hi all experts, May I know how to read a csv file and read the content in a hash in PERL? Currently, I hard-coded and defined it in my code. I wanna know how to make up the %mymap hash thru reading the cfg.txt ==== csv file(cfg.txt): 888,444 999,333 === #!/usr/bin/perl my... (1 Reply)
Discussion started by: kinmak
1 Replies

4. Shell Programming and Scripting

Configuration File storing in a Hash

Hi How to read a config file and to store it in a hash in a perl script. Regards Harikrishna (1 Reply)
Discussion started by: Harikrishna
1 Replies

5. Shell Programming and Scripting

Hash in perl

Hi Help me with some good links of Hash with in Hash .(Multidimensional hash).. Regards Harikrishna (1 Reply)
Discussion started by: Harikrishna
1 Replies

6. Shell Programming and Scripting

Perl Hash

HI I have a hash like this $hashname->{$filesystem}->{'fsname'}=$filesystem; How to get the values from this multilevel hash. Thanks in advance... :) (1 Reply)
Discussion started by: Harikrishna
1 Replies

7. Shell Programming and Scripting

Perl Hash

hi i have two hash achi %disk1,%disk2 with( key, value) (key1,value1) How to store it in another hash.. Plz replyyy. Regards Hari (1 Reply)
Discussion started by: Harikrishna
1 Replies

8. Shell Programming and Scripting

Hash Question in Perl

Learning Perl here, so bear with me... Have a hash that i need to delete the entry out of and am having problems doing that. Basically, I need to delete all entries from the hash that have values over 5,000,000. What I am trying to do is to find each entry and delete it. Does not work - I have... (6 Replies)
Discussion started by: deadletter
6 Replies

9. Shell Programming and Scripting

Perl Hash if exists

print $hash{$value} if exists $hash{$key}; would only print my top value, and not the one I want to "match".... should i not be using if exists? how would you recommend "searching" a hash file... thanks! (6 Replies)
Discussion started by: yesokay
6 Replies

10. Shell Programming and Scripting

Perl hash containing arrays

Hi, I am not that good at Perl. But here's what I wanna do. I want to create a hash where the keys would point to different arrays. This is what I have tried to do but in vain :( @arr=(1,2,3); @arr1=(3,2,1); %hashOfLists=(); $hashOfLists{Key1}=@arr."\n"; $hashOfLists{Key2}=@arr1."\n";... (3 Replies)
Discussion started by: King Nothing
3 Replies

11. Shell Programming and Scripting

Perl question - print last element in a hash?

I am modifying someone else's code. There is a foreach statement printing the contents of a hash. Can someone give me an example of printing the last element in a hash? The output currently is A B C D E I want the output to be E (1 Reply)
Discussion started by: streetfighter2
1 Replies

12. Shell Programming and Scripting

perl hash - using a range as a hash key.

Hi, In Perl, is it possible to use a range of numbers with '..' as a key in a hash? Something in like: %hash = ( '768..1536' => '1G', '1537..2560' => '2G' ); That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Discussion started by: dsw
3 Replies

13. Programming

Hash table

Hi, I hope someone can help me with the following prob.. I need to implement a hashtable whose KEYs are strings and VLAUEs are again hashtables. ie key - is a string and value -is another hashtable . So.... how am I supposed to be implementing my nested hashtable? Thanks in advance (1 Reply)
Discussion started by: andrew.paul
1 Replies

14. Programming

Algorthm bug of my code

Hello, This porblem bugged me for some time. It is to merge different files of hundred rows to have a union with the ID as key column (kind of similar to join!) and absence with 0. ID File1 A 1 C 3 D 4 M 6 ID File2 A 5 B 10 C 15 Z 26 ID File3 A 2 B 6 O 20 X 9 I want the output... (9 Replies)
Discussion started by: yifangt
9 Replies

15. Programming

Perl Json and Hash

Hi all, i am using the following code to that use curl to that outputs a json, i am stuck it into a hash but i canot figure out how to get just the value i need ( hostname) here is my code use warnings; use strict; use Data::Dumper qw(Dumper); ##use JSON; use JSON::XS; my $curl=... (2 Replies)
Discussion started by: ab52
2 Replies