NAME
Hash::Extract - extract hash values onto lexical variables.
VERSION
Version 0.02
SYNOPSIS
use Hash::Extract qw(hash_extract);
%hash = ( red => 'apple', blue => 'sky', );
hash_extract( \%hash, my $blue );
print $blue; # ==> 'sky'
EXPORT
This module can export one function.
FUNCTIONS
hash_extract(\%hash, my $xxx, my $yyy);
extract value which is contained in hash into specified variable. hash key of that is same as variable name.
currently, you can use lexical variables declared in same scope as you call this function.
hash_extract( $hashref, my $xxx);
# ==> my $xxx = $hashref->{xxx};
hash_extract( $hashref, our $xxx);
# ==> die: could not detect name of variable.
note: in this version, hash_extract do not check value of arguments. but options may be added in future release. it is better that variables are set undefined.
AUTHOR
YAMASHINA Hio, <hio at cpan.org>
BUGS
Please report any bugs or feature requests to bug-hash-extract at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Hash-Extract. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Hash::Extract
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
SEE ALSO
COPYRIGHT & LICENSE
Copyright 2006-2007 YAMASHINA Hio, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.