Personal tools
Skip to content. | Skip to navigation
Hashes are great for storing named data, but if you want more than one entry for a name, you have to use a list of pairs. Even then, this is really boring to write: $values = [ foo => undef, bar => undef, baz => undef, xyz => { ... }, ]; With Data::OptList, you can do this instead: $values = Data::OptList::mkopt([ qw(foo bar baz), xyz => { ... }, ]); This works by assuming that any defined scalar is a name and any reference following a name is its value.
Data::Perl is a collection of classes that wrap fundamental data types that exist in Perl. These classes and methods as they exist today are an attempt to mirror functionality provided by Moose's Native Traits. One important thing to note is all classes currently do no validation on constructor input.
Data::Section provides an easy way to access multiple named chunks of line-oriented data in your module's DATA section. It was written to allow modules to store their own templates, but probably has other uses.
Data::Dumper and other modules do a great job of dumping data structures. Their output, however, often takes more brain power to understand than the data itself. When dumping large amounts of data, the output can be overwhelming and it can be difficult to see the relationship between each piece of the dumped data. Data::TreeDumper also dumps data in a tree-like fashion but hopefully in a format more easily understood.
This module exports a number of functions that are useful for validating and converting data types. It is intended for use in applications where data types are more important than they typically are in Perl -- e.g., database applications.
Data::Uniqid provides three simple routines for generating unique ids. These ids are coded with a Base62 system to make them short and handy (e.g. to use it as part of a URL).
This module provides utility functions for data and data types, including functions for subroutines and symbol table hashes (stashes). The implementation of this module is both Pure Perl and XS, so if you have a C compiler, all the functions this module provides are really faster. There are many benchmarks in the _DIST-DIR/benchmark/_ directory.