Class::MakeMethods::Composite::Hash is a Perl module with composite hash methods.
use Class::MakeMethods::Composite::Hash (
new => 'new',
scalar => [ 'foo', 'bar' ],
array => 'my_list',
hash => 'my_index',
my $obj = MyObject->new( foo => 'Foozle' );
$obj->my_list(0 => 'Foozle', 1 => 'Bang!');
$obj->my_index('broccoli' => 'Blah!', 'foo' => 'Fiddle');
The Composite::Hash suclass of MakeMethods provides a basic constructor and accessors for blessed-hash object instances.
Class::MakeMethods Calling Interface
When you use this package, the method declarations you provide as arguments cause subroutines to be generated and installed in your module.
You can also omit the arguments to use and instead make methods at runtime by passing the declarations to a subsequent call to make().
You may include any number of declarations in each call to use or make(). If methods with the same name already exist, earlier calls to use or make() win over later ones, but within each call, later declarations superceed earlier ones.
You can install methods in a different package by passing -TargetClass => package as your first arguments to use or make.