Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Data::Perl::CollectionUsersContributedtPerPerl::Collection::Hash::MooseLike(3)

NAME
       Data::Perl::Collection::Hash::MooseLike - Collection::Hash subclass
       that simulates Moose's native traits.

VERSION
       version 0.001008

SYNOPSIS
	 use Data::Perl::Collection::Hash::MooseLike;

	 my $hash = Data::Perl::Collection::Hash::MooseLike->new(a => 1, b => 2);

	 $hash->values;	# (1, 2)

	 $hash->set('foo', 'bar'); # (a	=> 1, b	=> 2, foo => 'bar')

DESCRIPTION
       This class provides a wrapper and methods for interacting with a	hash.
       All methods are written to emulate/match	existing behavior that exists
       with Moose's native traits.

DIFFERENCES IN FUNCTIONALITY
       get($key, $key, ...)
	   Returns values from the hash.

	   In list context it returns a	list of	values in the hash for the
	   given keys. In scalar context it returns the	value for the last key
	   specified.

       set($key, $value, ...)
	   Sets	the elements in	the hash to the	given values. It returns the
	   new values set for each key,	in the same order as the keys passed
	   to the method.

	   This	method requires	at least two arguments,	and expects an even
	   number of arguments.

       delete($key, $key, ...)
	   Removes the elements	with the given keys.

	   In list context it returns a	list of	values in the hash for the
	   deleted keys.  In scalar context it returns the value for the last
	   key specified.

SEE ALSO
       o   Data::Perl

       o   Data::Perl::Role::Collection::Hash

AUTHOR
       Matthew Phillips	<mattp@cpan.org>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2015 by Matthew Phillips
       <mattp@cpan.org>.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.0			  20Data::Perl::Collection::Hash::MooseLike(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | DIFFERENCES IN FUNCTIONALITY | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Data::Perl::Collection::Hash::MooseLike&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help