NAME

HashData - Specification for HashData::*, modules that contains hash data

SPECIFICATION VERSION

0.1

VERSION

This document describes version 0.1.2 of HashData (from Perl distribution HashData), released on 2024-01-22.

SYNOPSIS

Use one of the Hash::* modules.

DESCRIPTION

NOTE: EARLY SPECIFICATION; THINGS WILL STILL CHANGE A LOT.

HashData::* modules are modules that contain hash data. The hash can be stored in an actual Perl hash in the source code, or as lines in the DATA section of the source code, or in other places. The hash data can be accessed via a standard interface (see HashDataRole::Spec::Basic). Some examples of hash data are:

Why put data in a Perl module, as a Perl distribution? To leverage the Perl/CPAN toolchain and infrastructure: 1) ease of installation, update, and uninstallation; 2) allowing dependency expression and version comparison; 3) ease of packaging further as OS packages, e.g. Debian packages (converted from Perl distribution); 4) testing by CPAN Testers.

To get started, see HashDataRole::Spec::Basic and one of existing HashData::* modules.

NAMESPACE ORGANIZATION

HashData (this module) is the specification.

HashDataRole::* the roles.

HashDataRoles-* is name for distribution that contains several roles.

HashDataBase::* the base classes. HashDataBases::* are main module names for distributions that bundle multiple base classes.

All the modules under HashData::* will be modules with actual data. They should be named using this rule:

HashData::<CATEGORY>::<VALUE_ENTITY>::By<KEY_ENTITY>

CATEGORY can be multiple levels. VALUE_ENTITY and KEY_ENTITY should be in singular form. Examples:

HashData::CPAN::AuthorName::ByPAUSEID
HashData::Country::EN::EnglishName::ByISO2
HashData::Country::EN::EnglishName::ByISO3
HashData::Country::EN::IndonesianName::ByISO2
HashData::Country::EN::IndonesianName::ByISO3
HashData::Country::EN::ISO2::ByIndonesianName (reverse mapping of country Indonesian names to ISO 2-letter codes)

An exception is HashData::Dict::* where it is assumed that keys will be entries (usually words) and values will be the entries' definitions. Examples:

HashData::Dict::EN::OxfordLearner (no need for: HashData::Dict::EN::OxfordLearner::Definition::ByWord)
HashData::Dict::ID::KBBI
HashData::Dict::EN::FOLDOC

HashDataBundle-* is name for distribution that contains several HashData modules.

FAQ

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/HashData.

SOURCE

Source repository is at https://github.com/perlancar/perl-HashData.

SEE ALSO

Related projects: ArrayData, TableData.

AUTHOR

perlancar <perlancar@cpan.org>

CONTRIBUTING

To contribute, you can send patches by email/via RT, or send pull requests on GitHub.

Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:

% prove -l

If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE

This software is copyright (c) 2024, 2021 by perlancar <perlancar@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.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HashData

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.